rafiq01
asked on
How to add 'Parameters' key, it's value name and value value in the registry using sc.exe
Hello,
In order to start an application with a service when the computer starts I am have created a service using the following code:
sc create MyTestService binPath= c:\windows\system32\srvany .exe type= own type= interact start= auto
This works perfectly to create the service with start type automatic and interact with desktop. However, I need to add a key called 'Parameters' in the registry created by the above command under:
[HKEY_LOCAL_MACHINE\SYSTEM \CurrentCo ntrolSet\S ervices\My TestServic e]
And, then I want to add a value like:
"Application"="c:\\Program Files\\3D\\MyTestService"
After creating the service with the sc.exe I can manually create this 'Parameter' key, add value and it wroks fine but I do not want to do this manually. I want to do it through sc.exe.
Your quick response is greatly appreciated.
In order to start an application with a service when the computer starts I am have created a service using the following code:
sc create MyTestService binPath= c:\windows\system32\srvany
This works perfectly to create the service with start type automatic and interact with desktop. However, I need to add a key called 'Parameters' in the registry created by the above command under:
[HKEY_LOCAL_MACHINE\SYSTEM
And, then I want to add a value like:
"Application"="c:\\Program
After creating the service with the sc.exe I can manually create this 'Parameter' key, add value and it wroks fine but I do not want to do this manually. I want to do it through sc.exe.
Your quick response is greatly appreciated.
sc create MyTestService binPath= c:\windows\system32\srvany.exe type= own type= interact start= auto
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent!
Works perfectly.
Thanks so much the life saver
Works perfectly.
Thanks so much the life saver
ASKER
I want to create a key called 'Parameters' under:
[HKEY_LOCAL_MACHINE\SYSTEM
And, then I want to add a value like:
"Application"="c:\\Program