KpyM Telnet/SSH Server - Forum
rbruder System.BadImageFormatException:

I am trying to embed the KpyM source code into my Solution in order to provide a single installer that will install the daemon alongside my applications service. However when I try to install the daemon using InstallUtil I get the following error message.

System.BadImageFormatException: Could not load file or assebly 'file://C:\Path\SSHDaemon.exe' or one of its dependencies. The module was expected to contain an assembly manifest..

*Note: The project name was changed from daemon to SSHDaemon due to a naming conflict.

Any assistance would be appreciated.


Kroum Grigorov
AFAIK InstallUtil can be used with .Net binaries only, KpyM Server is native Win32 application and should not work with InstallUtil.
I think the sc.exe is the tool you will need to install Win32 services.
Besides you can just use "daemon.exe -install" to install the binary as service and/or the other switches:
daemon.exe -install -> install as service
daemon.exe -uninstall -> uninstall the service
daemon.exe -stop -> stop the service
daemon.exe -start -> start the service

You should know that changing the name of the deamon process is not quite good idea as internaly the tool makes assumptions based on the fixed name "daemon.exe", so it might or might not work under the name SSHDaemon.exe, you will have to figure this out yourself.

Finally there's a shortcut named "session.exe.lnk" that should be placed in the SSHDaemon.exe folder and this shortcut should point to "session.exe" binary, keep this in mind if you plan to install the KpyM service in another location than the default one(c:\program files\kts)


Thanks for the response. I will give it a try.


© 2007 - 2008 Kroum Grigorov
Powered by phpBB © 2001, 2005 phpBB Group