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

x
?
Solved

writing Batch file question again

Posted on 2005-04-26
4
Medium Priority
?
216 Views
Last Modified: 2010-04-18
I am looking at a batch file that's written in this context

net stop "xxxx" /yes
net stop "xxx" /yes

can someone explain to me why the service that needed to be stopped had to have the " " around it? PLus what does the /yes imply.


Thanks
0
Comment
Question by:iamuser
  • 4
4 Comments
 
LVL 57

Expert Comment

by:Pete Long
ID: 13866619
>>can someone explain to me why the service that needed to be stopped had to have the " " around it?

they only need quotes if there is a SPACE in them

net stop spooler

works cause spooler has no space in it :)
0
 
LVL 57

Accepted Solution

by:
Pete Long earned 500 total points
ID: 13866636
to quantify

net stop windows time

will fail

net stop "windows time"

will work
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 13866647
the /yes switch Carries out the command without first prompting you to provide information or confirm actions.
http://home.earthlink.net/~rlively/MANUALS/COMMANDS/N/NETSTOP.HTM
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 13867150
ThanQ
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
Learn about cloud computing and its benefits for small business owners.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

872 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