New Windows Service installed, fails to start: “System error 2 … system cannot find the file specified”

后端 未结 6 1888
广开言路
广开言路 2021-02-04 23:43

I have installed several other custom .Net windows services successfully. A new one I had recently written was very similar to the others and while it installed without error -

6条回答
  •  眼角桃花
    2021-02-05 00:09

    I had a similar issue with a service, where I was getting the same error.

    I went to:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\YourServiceName\ImagePath

    My 'ImagePath' was set to a virtual drive called "W:\" that exists on "C:\".
    I replaced this path with the actual file location on the C:\ drive and then the service started successfully

提交回复
热议问题