[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

service restart via batch script

Posted on 2006-11-14
3
Medium Priority
?
6,625 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 200 total points
ID: 17942575
0
 
LVL 1

Accepted Solution

by:
Bazmic earned 800 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Make the most of your online learning experience.
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

834 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