BigDaddyO 60 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 hmm... I guess I have to have a signature... Share this post Link to post Share on other sites
w0uter 4 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 Share this post Link to post Share on other sites
GaryFrost 18 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. Share this post Link to post Share on other sites
DaveF 0 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. Share this post Link to post Share on other sites