I have a service that I\'ve built using the C# ServiceBase class. It works when I run it in Windows 7 and Windows Server 2008; however, it doesn\'t work on Windows XP.
<
You must have compiled your exe either for .Net 4.5 or for 64-bit architecture (or both). This is the explanation of error code you run into from WinError.h:
// %1 is not a valid Win32 application.
//
#define ERROR_BAD_EXE_FORMAT 193L
Make sure you have compiled it for x86 platform or Any CPU, and whatever version of .Net Framework you compiled against is installed on the machine.