Microsoft KB Archive/812486

= Event ID 7000 and &quot;%1 Is Not a Valid Win32 Application&quot; Error Message When You Start a Service =

Article ID: 812486

Article Last Modified on 12/3/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
 * Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
 * Microsoft Windows Server 2003, Standard x64 Edition
 * Microsoft Windows Server 2003, Enterprise x64 Edition
 * Microsoft Windows Server 2003, Datacenter x64 Edition
 * Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
 * Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems
 * Microsoft Windows Small Business Server 2003 Standard Edition
 * Microsoft Windows Small Business Server 2003 Premium Edition
 * Microsoft Windows XP Home Edition
 * Microsoft Windows XP Professional
 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition

-



SYMPTOMS
One or more of the services that are installed on your computer do not start, and one of the following issues occurs:  You receive the following error message:

Error 193: %1 is not a valid Win32 application.

-and-  The following event is logged in the System event log for each service that does not start: Event ID: 7000

Source: Service Control Manager

Type: Error

Description:

The  service failed to start due to the following error: %1 is not a valid Win32 application. 



CAUSE
This issue may occur if the path of the executable file for the service contains spaces.

When Windows starts a service, it parses the path of the service from left to right. If both of the following conditions are true, Windows may locate and try to run the file or folder before it locates and runs the executable file for the service:
 * The path of a service’s executable file contains spaces.
 * There is a file or folder on your computer’s hard disk that has the same name as a file or folder in the path to the service's executable file.

For example, if the path of the executable file for a service is C:\Program Files\MyProgram\MyService.exe, and if a folder that is named C:\Program also exists on your hard disk, Windows locates the C:\Program folder on your hard disk before the C:\Program Files\MyProgram\My Service.exe file, and then tries to run it.



RESOLUTION
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To resolve this issue, add quotation marks around the following entry in the Windows registry, where  is the name of the service:

The ImagePath entry contains the path of the executable file for the service. To add quotation marks around the ImagePath entry for a service:  Click Start, and then click Run. In the Open box, type regedit, and then click OK. Locate, and then click the following registry entry, where <ServiceName> is the name of the service:

.

For example, if the service is named MyService, locate the  key.</li> In the right pane, double-click  .</li> In the Value data box, add quotation marks around the complete path of the executable file for the service.

For example, if the path of the MyService service is C:\Program Files\MyProgram\MyService.exe, change the entry in the Value data box for the MyService service to the following

&quot;C:\Program Files\MyProgram\MyService.exe&quot;

</li> Click OK, and then quit Registry Editor.</li></ol>

Keywords: kbprb KB812486

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.