Dwight Posted June 29, 2006 Share Posted June 29, 2006 Hi All, Love AutoIT!!! It's really helped me in my XP upgrade rollout. In one of my scripts I need to run the "devcon" app from the command line. I use this to query the system hw to see if a specific NIC adapter is present. If so, then I later update the driver for it using devcon again. What I need to so is run this command: devcon find * | find 'Broadcom' | find 'PCI' ...which generates this output... PCI\VEN_14E4&DEV_167D&SUBSYS_05771014&REV_11\4&111A1FD8&0&00E0: Broadcom NetXtreme Gigabit Ethernet #2 I need to set a variable's value to that text output. Running the devcon commands is not a problem. However, the "output" of running devcon via RunWait just returns 0 or 1, based on success or failure. So what's the right way to capture this true output so I can either: a) immediately use it, or store it in a variable ?? Link to comment Share on other sites More sharing options...
GaryFrost Posted June 29, 2006 Share Posted June 29, 2006 Might want to look into StdoutRead in the help file 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...
Dwight Posted June 29, 2006 Author Share Posted June 29, 2006 Might want to look into StdoutRead in the help fileThanks... but I did a search in the Index and regular Search for "StdoutRead" with no results...Searched for "out" also with nothing as you describe.So what am I missing? Is it called something else? Link to comment Share on other sites More sharing options...
w0uter Posted June 29, 2006 Share Posted June 29, 2006 search the board for _RunSTD() it should give you an idee how to do it. 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...
Dwight Posted June 29, 2006 Author Share Posted June 29, 2006 Might want to look into StdoutRead in the help fileOK, I see that I'm using the "public" version and in the beta version, there are additional commands you are both speaking of. OK, let me try these. Thanks! Link to comment Share on other sites More sharing options...
Dwight Posted June 30, 2006 Author Share Posted June 30, 2006 One last thing...First, I got the StdOutRead to work...However, I need to run this command:$GetDevconID = Run("C:\Windows\XPupgrade\devcon find * | find "Broadcom" | find "PCI"", "", @SW_HIDE, 2)Notice that my command line requires the " symbol. The ' symbol can not be used.I can not seem to figure out how to get the " symbols to stay in my command line and have AutoIT interpret the command correctly. Hopefully I'm explaining this correctly. Link to comment Share on other sites More sharing options...
zenmaster Posted June 30, 2006 Share Posted June 30, 2006 Change the out "s to 's See below.... $GetDevconID = Run('C:\Windows\XPupgrade\devcon find * | find "Broadcom" | find "PCI"', "", @SW_HIDE, 2) 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