Solved

service restart via batch script

Posted on 2006-11-14
3
6,617 Views
Last Modified: 2008-02-01
I have a service that i have to restart quite often to get one of the apps working.

My batch script currently is

@echo off
net stop MySvc
net start MySvc

the problem is that the "net stop MySvc" sometimes asks for a Yes/No response as it has some dependency
So, i wanted to ask if there was a way to automate the 'Y' response in that batch script ..

Please let me know

Thanks,
0
Comment
Question by:jibranilyas
3 Comments
 
LVL 7

Assisted Solution

by:dlangr
dlangr earned 50 total points
ID: 17942575
0
 
LVL 1

Accepted Solution

by:
Bazmic earned 200 total points
ID: 17942581
Put a /y at the end of the net stop command
IE: net stop iisadmin /y

Enjoy
0
 

Author Comment

by:jibranilyas
ID: 17942613
Thanks Bazmic ... luv it :)

p.s. dlangr, thanks for the suggestion, i will look into that as well.
0

Featured Post

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now