Net Start

K

Ken

I am not sure of the proper place to post this.

I am looking for the proper syntax do perform a net start from the command
line with parameters. Does anyone know the syntax?

Example: Net Start "MyService C:\MyParamsFile.config"

Thanks in advance!


Ken
 
W

Walter Schulz

I am looking for the proper syntax do perform a net start from the command
line with parameters. Does anyone know the syntax?

Example: Net Start "MyService C:\MyParamsFile.config"

NET START won't do the job. Take a look into
HKLM\system\CurrentControlSet\Services\<internal name for
MyService>
You will find an entry named "Imagepath" which consists of
the "path\<file name>" (required) and additional
parameters (if any). You will find an example under
MSIServer.

"Net start" will not be able to append anything to the
Imagepath entry.

Possible solutions:
Create a reg file with the entry you want to use and run
this batch:

REGEDIT /S myconfig.reg
net start myservice

Or use SC.EXE like
SC CONFIG MYSERVICE binPath=<as wanted>
net start Myservice

Ciao, Walter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top