Page 2 of 2 <12
Topic Options
#139379 - 2005-05-08 03:25 PM Re: Cant pipe output in SHELL - tried for 4 days now !
Brant_Winter Offline
Fresh Scripter

Registered: 2005-05-08
Posts: 26
I wouls also like to strip the path,

C:\Program Files\Symantec\LiveState Recovery\Advanced Server 3.0\Agent\CommandFiles\

out as variable, but when i try it just gives the error
Code:
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

error again.

Top
#139380 - 2005-05-08 03:35 PM Re: Cant pipe output in SHELL - tried for 4 days now !
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Something like this?
Code:
break on
$RC = SetOption('WrapAtEOL','on')
$Path = 'C:\Program Files\Symantec\LiveState Recovery\Advanced Server 3.0\Agent\CommandFiles\'

$ShellCMD = '%comspec% /c ""' + $path + 'psservice.exe" \\hocacomms1 query "totalcoms agent" >"test54.txt""'
$ShellCMD ?

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#139381 - 2005-05-08 03:43 PM Re: Cant pipe output in SHELL - tried for 4 days now !
Brant_Winter Offline
Fresh Scripter

Registered: 2005-05-08
Posts: 26
Thank you both very much for you help !
Top
#139382 - 2005-05-08 04:10 PM Re: Cant pipe output in SHELL - tried for 4 days now !
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Did you get it running or no ?
Top
#139383 - 2005-05-08 05:00 PM Re: Cant pipe output in SHELL - tried for 4 days now !
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
There are FAQs on how to use RN/SHELL and how to use quotes. Also, searching the UDF Forum just for the word 'service' in the subject line give me a multitude of hits, e.g.
WMIChangeService - WMI Change Service Details ,
fnWMIService - Use the Win32_Service class of WMI to control services ,
WMIService() - Control NT services ,
ActiveService()- Checks whether a service is active ,
WMIService() - Control NT services ,
SVCStatus() - Shows the status of a Service on a NetworkComputer ,
ServiceMode() - Checks/sets the startup mode of a service
_________________________
There are two types of vessels, submarines and targets.

Top
#139384 - 2005-05-09 04:20 AM Re: Cant pipe output in SHELL - tried for 4 days now !
Brant_Winter Offline
Fresh Scripter

Registered: 2005-05-08
Posts: 26
Thanks every one for your help, I got it working based on some code from SVCStatus()

See it here:
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=138594&page=0&vc=1#Post138594


Edited by Brant_Winter (2005-05-09 04:20 AM)

Top
#139385 - 2005-05-09 04:35 AM Re: Cant pipe output in SHELL - tried for 4 days now !
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
What's the value of those two UDFs that's not already coverd in the list of UDFs I've provided to you?
_________________________
There are two types of vessels, submarines and targets.

Top
#139386 - 2005-05-09 05:23 AM Re: Cant pipe output in SHELL - tried for 4 days now !
Brant_Winter Offline
Fresh Scripter

Registered: 2005-05-08
Posts: 26
not values, just a different way to stop the service...
Top
Page 2 of 2 <12


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

Who's Online
0 registered and 1260 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.04 seconds in which 0.017 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