D
djmob
I am very new to .NET and Windows programming in general so please bare with
me...
I created a Windows service by deriving a class from ServiceBase and
installing it via the 'sc create' commands as follows:
sc create <name> binPath= <path>
Where path is the fully qualified path name. The new service appeared in the
Services GUI and I was able to start and stop it without problems. Next I
recreated the service via the 'sc create' command where binPath used a mapped
drive letter via the subst command i.e. 'subst x: c:\actual\path\name' The
service is created but it does not start and I get the following error
message:
Could not start the <name> service on Local Computer. Error 3: The system
cannot find the path specified.
Unfortunately it is a requirement of my project to be able to used a mapped
driver letter. It appears that when the service is started it has no
knowledge of the drive mappings in my environment. After some research it
also appears that using the subst command is discouraged in later versions of
Windows and the preferred method is to use net commands. I have not been
entirely successful with the net commands and hope there is another approach
to solving this problem. Any suggestions???
me...
I created a Windows service by deriving a class from ServiceBase and
installing it via the 'sc create' commands as follows:
sc create <name> binPath= <path>
Where path is the fully qualified path name. The new service appeared in the
Services GUI and I was able to start and stop it without problems. Next I
recreated the service via the 'sc create' command where binPath used a mapped
drive letter via the subst command i.e. 'subst x: c:\actual\path\name' The
service is created but it does not start and I get the following error
message:
Could not start the <name> service on Local Computer. Error 3: The system
cannot find the path specified.
Unfortunately it is a requirement of my project to be able to used a mapped
driver letter. It appears that when the service is started it has no
knowledge of the drive mappings in my environment. After some research it
also appears that using the subst command is discouraged in later versions of
Windows and the preferred method is to use net commands. I have not been
entirely successful with the net commands and hope there is another approach
to solving this problem. Any suggestions???