Batch for Command success or fail!

  • Thread starter Thread starter Alan Tang
  • Start date Start date
A

Alan Tang

Hello:

Is it possible to write a batch file which will detect the service is
running or not. It also will display the service status!

Is any problem on the following line?

net start | find /i "telnet" && echo Service Started! || echo Service
NOT Started!

Thanks!
 
Hello:

Is it possible to write a batch file which will detect the service is
running or not. It also will display the service status!

Is any problem on the following line?

net start | find /i "telnet" && echo Service Started! || echo Service
NOT Started!

Thanks!

You command works, but you might want to try netsvc, tip 770 in the 'Tips &
Tricks' at http://www.jsiinc.com. The W2K Reskit kit supplement is at tip 3277.

Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top