Briegel Posted June 27, 2006 Share Posted June 27, 2006 I'm writing a script to enable/disable the wlan networkcard. First the script verifies the state auf networkcard using "devcon.exe" and writes the result into a txt-file. But it doesn't performs. The same syntax inside commandline works fine. "@PCI\VEN_14B9&DEV_A504&SUBSYS_500014B9&REV_00\4&39A85202&0&10F0" = VendorID from networkcard For this example I'm working without variables and "@SW_HIDE". What's my mistake? $status = RunWait ('devcon.exe status ""@PCI\VEN_8086&DEV_103B&SUBSYS_10021734&REV_81\4&25296D99&0&40F0"">c:\temp\status.txt') Link to comment Share on other sites More sharing options...
GaryFrost Posted June 27, 2006 Share Posted June 27, 2006 try $status = RunWait ('devcon.exe status "@PCI\VEN_8086&DEV_103B&SUBSYS_10021734&REV_81\4&25296D99&0&40F0" > c:\temp\status.txt') 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...
w0uter Posted June 27, 2006 Share Posted June 27, 2006 1. why do you use "" if you already use ' 2. you can run it in @comspec & ' /c ' OR use Std* 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...
Ravenlark Posted June 27, 2006 Share Posted June 27, 2006 I'm writing a script to enable/disable the wlan networkcard. First the script verifies the state auf networkcard using "devcon.exe" and writes the result into a txt-file. But it doesn't performs. The same syntax inside commandline works fine. "@PCI\VEN_14B9&DEV_A504&SUBSYS_500014B9&REV_00\4&39A85202&0&10F0" = VendorID from networkcard For this example I'm working without variables and "@SW_HIDE". What's my mistake? $status = RunWait ('devcon.exe status ""@PCI\VEN_8086&DEV_103B&SUBSYS_10021734&REV_81\4&25296D99&0&40F0"">c:\temp\status.txt') Are you saying it doesn't write anything to the text file, or that the value of $status is not what you expected? Ravenlark-----------------------------------------------------when you find yourself with the majority, its time to pause and reflect - Mark Twain Link to comment Share on other sites More sharing options...
Briegel Posted June 27, 2006 Author Share Posted June 27, 2006 @gafrost and w0uter Yes 2" were too much. But same result. No "status.txt" @Ravenlark It doesn't create "status.txt". @w0uter 2. "@comspec /c" only works with 1" and I have my "status.txt" (good). Up to now I didn't understand "StdoutRead()" but you force me to try it and using this function ist the best way I think. Thank's to all. Link to comment Share on other sites More sharing options...
ivan Posted June 27, 2006 Share Posted June 27, 2006 (edited) try sorry, need to edit this, wrong app! #include <Process.au3> $path=path to devcon.exe $parms='status "@PCI\VEN_8086&DEV_103B&SUBSYS_10021734&REV_81\4&25296D99&0&40F0"' _RunDOS($path &"\" &'devcon.exe' &$parms &">" &$path &"\result.txt") IVAN Edited June 27, 2006 by ivan Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
Briegel Posted June 27, 2006 Author Share Posted June 27, 2006 @ivan Thanks for helping. But the best way for me is to use "StdoutRead()" . Link to comment Share on other sites More sharing options...
ivan Posted June 27, 2006 Share Posted June 27, 2006 i agree absolutely. Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 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