%1 Is Not a Valid Win32 Application

http://support.microsoft.com/kb/812486

Article ID: 812486 - Last Review: December 3, 2007 - Revision: 2.7

Event ID 7000 and "%1 Is Not a Valid Win32 Application" Error Message When You Start a Service

SYMPTOMS
One or more of the services that are installed on your computer do not start, an...

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 ServiceName 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...

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
Important This section, method, or task contains steps that tell you how to modi...

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756  (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows


To resolve this issue, add quotation marks around the following entry in the Windows registry, where <ServiceName> is the name of the service:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<ServiceName>\ImagePath
The ImagePath entry contains the path of the executable file for the service. To add quotation marks around the ImagePath entry for a service:
  1. Click Start, and then click Run.
  2. In the Open box, type regedit, and then click OK.
  3. Locate, and then click the following registry entry, where <ServiceName> is the name of the service:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<ServiceName>
    .
    For example, if the service is named MyService, locate the
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyService
    key.
  4. In the right pane, double-click
    ImagePath
    .
  5. 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
    "C:\Program Files\MyProgram\MyService.exe"
  6. Click OK, and then quit Registry Editor.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值