Jump to content

result from devcon.exe -> *.txt


Recommended Posts

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

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

@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

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 by ivan
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...