Batch for Command success or fail!

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!
 
J

Jerold Schulman

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
 

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