service restart via batch script

Posted on 2006-11-14
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

Question by:jibranilyas

Assisted Solution

dlangr earned 50 total points
ID: 17942575

Accepted Solution

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


Author Comment

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

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Email Domain Transfer 2 33
MAC Needs 2 Domains 2 42
Finding a free PC on campus 6 52
Homegroup issues 6 36
Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
After creating this article (, 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…
Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 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

15 Experts available now in Live!

Get 1:1 Help Now