Edited by xinglp, 03 April 2011 - 11:20 AM.
Login to Account Create an Account
Can I set environment value for a service ?
Posted 03 April 2011 - 11:19 AM
Posted 03 April 2011 - 01:56 PM
There are 3 ways to do it :
- The first two is create a new service with instsrv et srvany from the resource kit :
- make the new service launch a cmd which will set the variable and launch directly the executable launched by the original service
- or make a new service launch a cmd which will modify in the registry the environment variable and then launch the service sleep a little and remove the added reg entry
Posted 04 April 2011 - 02:42 AM
> make the new service launch a cmd which will set the variable and launch directly the executable launched by the original service
I just put the service's exe path to "svc.cmd" , and create a service by
sc create XXX binPath= path\to\svc.cmd
but when I start it , met the error below
The service did not respond to the start or control request in a timely fashion.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users