Solved

service restart via batch script

Posted on 2006-11-14
3
6,618 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expanding Subnet Mask 20 106
Switch ports not working 8 32
E-mail delayed during DNS server reboot 8 36
VMware ESXi vswitch - performance question 2 41
Let’s list some of the technologies that enable smooth teleworking. 
Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
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…

776 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