Page 1 of 1 1
Topic Options
#48268 - 1999-10-04 07:06 AM SHELL to stop Services
Anonymous
Unregistered


I am trying to stop Windows NT services using the “net stop” command.
I need to specify the service within quotes because of spaces within the name.
I don’t want to use a .bat file.

How can I specify a string containing quotes.

I‘ve tried: SHELL “net stop “Service””

Please help

Top
#48269 - 1999-10-04 09:48 AM Re: SHELL to stop Services
Anonymous
Unregistered


I haven't actually tried, but would this syntax work:

run "net stop ""Service Name"""

I don't really know if that is correct, but you can try?!@#

------------------
Gary Siepser, MCSE
LAWGIbb Group, Inc.
gsiepser@lawco.com

Top
#48270 - 1999-10-05 12:06 AM Re: SHELL to stop Services
Anonymous
Unregistered


Try something like:

$cmd = "net stop " + chr(34) + "service" + chr(34)

shell "$cmd"

also, according to the MANUAL (ahem)

'Double quote in a string: (")’
would result in:
Double quote in a string: (")

so I suppose you could also type:

$cmd = 'net stop "service"'
shell "$cmd"

..try it out

Top
#48271 - 1999-10-05 06:31 AM Re: SHELL to stop Services
Anonymous
Unregistered


Thanx

The single quote does the trick. I over looked that part of the manual. Sorry!

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.055 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org