BigDaddyO Posted June 7, 2005 Share Posted June 7, 2005 I am attempting to use the Windows XP utility schtasks.exe to list all scheduled tasks on a computer. I want to use the StdoutRead to get this info into my script without having to send the data to a CSV file then look through it later. The only way I have been able to get the schtasks.exe to work through Autoit is using run(@ComSpec & " /k schtasks.exe /query /fo csv /nh /v", @TempDir) I think the problem that the StdoutRead is having is that it's trying to read the output from the @ComSpec instead of the schtasks.exe. Is there any way to fix this? Thanks, Mike Link to comment Share on other sites More sharing options...
w0uter Posted June 7, 2005 Share Posted June 7, 2005 (edited) by not using @comspec but calling the .exe directly ? Edited June 7, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
GaryFrost Posted June 7, 2005 Share Posted June 7, 2005 And Please Post in Support. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
DaveF Posted June 7, 2005 Share Posted June 7, 2005 Is there any way to fix this?Too little to go on, Brother.I don't know whether to take the posted function call above as actually from your script, but I do note that there's no fourth parameter to tell Run that you want to capture STDOUT.The /k switch to @COMSPEC tells it to keep the console running after the program that you're calling exits; when you use it it seems like the command shell doesn't output anything to STDOUT until the console window is closed. Probably not desired, so I'd use /c instead or just call the program directly in Run... Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now