Error 193: "% 1 is not a valid Win32 application on Windows Server 2003

I would like to get some help, I get this error when trying to start a Windows service, and it drives me crazy. Details:

  • I have a Windows service developed on VB.NET (VS 2012), it is compiled for an x86 machine.
  • I used the InstallUtil command and the SC CREATE command to install the service on a client server (running Windows Server 2003).
  • When I try to start the service, I receive the following error message: "The service could not be started on the local computer. Error 193: 0xc1"
  • I looked through the Event Viewer for some hints, but I could not find very useful information: on the Application tab there are no entries registered by the service, so I assume that it does not even run a single line of code. The System tab contains entries recorded by the Service Control Manager with the following error message: "% 1 is not a valid Win32 application."

I continued researching the Internet, and the only solution is to check the Windows registry to find ImagePath for the service and add some quotes at the beginning and end of the path. This should fix the problem, but it does not work in my case. I changed ImagePath several times (I added and removed quotes, tried with double triple quotes), but I am not getting any positive results.

- ? ...

+5
2

, .net framework, , Windows Server 2003. .net 4.5? Windows Server 2003 , 4.5.

http://www.microsoft.com/visualstudio/eng/products/compatibility

, 4.0.

+6

, , Windows .

Visual Studio 2015 Project Properties Window

+1

All Articles