Sign in to follow this  
Followers 0
Briegel

result from devcon.exe -> *.txt

8 posts in this topic

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')

Share this post


Link to post
Share on other sites



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.

 

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by ivan

Share this post


Link to post
Share on other sites

@ivan

Thanks for helping.

But the best way for me is to use "StdoutRead()" .

Share this post


Link to post
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
Sign in to follow this  
Followers 0