You are not logged in.

#1 13 Sep 2014 13:16

ysong131
New Member
Registered: 13 Sep 2014
Posts: 2

net stop service return error

The command "net stop serviceName" will return error if the service doens't exist.
Is there any way to suprress the error? So that if the service doesn't exist, the command would do nothing

Offline

#2 13 Sep 2014 14:12

foxidrive
Member
Registered: 04 Apr 2013
Posts: 339

Re: net stop service return error

Add >nul 2>&1 at the end of the line.

Offline

#3 14 Sep 2014 14:13

ysong131
New Member
Registered: 13 Sep 2014
Posts: 2

Re: net stop service return error

that works! thank you, fixidrive!

Offline

Board footer

Powered by