View previous topic :: View next topic |
Author |
Message |
dmonckton Contributor
Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Mon Jul 11, 2011 10:48 am Post subject: Tasklist piping problem |
|
|
Hi All
I can not get the following code to work...
Code: | list create,1
list add,1,"tasklist /svc"
runz cmd.exe" /c tasklist /svc",pipe,wait 15
list append,1,@pipe()
exit |
The piped data is incomplete. I've tried using an untimed wait but
VDS just hungs. I've also tried a 60 second wait but the piped data
is still incomplete. If I run Tasklist /svc from a console it is almost
instant. Any ideas why it does not capture all the output??
Thanks
David... |
|
Back to top |
|
|
Aslan Valued Contributor
Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Mon Jul 11, 2011 2:00 pm Post subject: |
|
|
I know this doesn't answer your question but using WAIT with PIPE does nothing. With PIPE the script halts until the console closes anyway. |
|
Back to top |
|
|
Aslan Valued Contributor
Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Mon Jul 11, 2011 2:13 pm Post subject: |
|
|
Try this
Code: | list create,1
list add,1,"tasklist /svc"
runz cmd.exe /c tasklist /svc,pipe
list append,1,@pipe()
list savefile,1,@path(%0)temptsklst.txt
run notepad.exe @path(%0)temptsklst.txt
exit |
The above works for my on Win7 x64.
Note make sure you save this script before running or the @path() functions won't work. |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
|
Back to top |
|
|
dmonckton Contributor
Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Wed Jul 13, 2011 10:49 am Post subject: |
|
|
Thanks for your help. This is what worked for me in the end and its fast enough for my needs.
Code: | list create,1
list create,2
list add,1,"tasklist /svc"
runz cmd.exe" /c tasklist /svc > %temp%\zzzzu.txt",wait 30
list loadfile,2,@env(temp)\zzzzu.txt
list append,1,2
file delete,@env(temp)\zzzzu.txt
list close,2 |
I don't know why the original code didn't work. Perhaps its our H.I.P.S. or A.V. software that stops the piping???
Thanks
David |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|