To restart a service via a batch file, open a blank notepad file.
type net stop “servicename”
type net start “servicename”
For example, you would stop the printer spooler service by typing:
net stop “Print Spooler”
net start “Print Spooler”
Once done, save the file with a .bat extension. Example restart.bat
Note: You may need to re enter the speech marks if you were to copy the above command into a notepad.
Dear Sir,
I wanna asked a question that how can we restart a services by using .Bat files at another user of this services.
Regards,
Ankur K
Hi Ankur
Could you explain what you are trying to do?
Please note the example is wrong, as it uses the wrong quotes.
Do NOT copy-paste the example, you must use standard unicode “straight” quotes like this:
net stop “Service”
net start “Service”