• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

writing Batch file question again

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
iamuser
Asked:
iamuser
  • 4
1 Solution
 
Pete LongTechnical ConsultantCommented:
>>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
 
Pete LongTechnical ConsultantCommented:
to quantify

net stop windows time

will fail

net stop "windows time"

will work
0
 
Pete LongTechnical ConsultantCommented:
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
 
Pete LongTechnical ConsultantCommented:
ThanQ
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now