Solved

service restart via batch script

Posted on 2006-11-14
3
6,622 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

726 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