ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Turn a batch file into an AHK script.

<< < (14/16) > >>

4wd:
devcon status "*DEV_001C*" | find /i "disabled"

So what does the above produce for enabled/disabled?

And what does this output:

--- Code: Text ---devcon status "*DEV_001C*" | find /i "disabled" >NULif errorlevel 1 goto runningecho disabledgoto alldone:runningecho enabled:alldonepause

pilgrim:
You're Famous!:

  :Thmbsup:

I'll check the script out when I'm next using the Netbook.  :)

pilgrim:
devcon status "*DEV_001C*" | find /i "disabled"

So what does the above produce for enabled/disabled?-4wd (May 26, 2013, 07:05 AM)
--- End quote ---

enabled: Nothing!
disabled: Device is disabled

And what does this output:

--- Code: Text ---devcon status "*DEV_001C*" | find /i "disabled" >NULif errorlevel 1 goto runningecho disabledgoto alldone:runningecho enabled:alldonepause
--- End quote ---

C:\Documents and Settings\Pilgrim\My Documents\Received Files>
devcon status "*DEV_001C*"   | find /i "disabled"  1>NUL
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe.

I'm attaching a copy of the full script I'm running in case it is of use:

4wd:
Your XP installation doesn't seem able to accept pipes within a batch file for some reason - you have a problem.

XP did have a known problem with STDIN/STDOUT but it was supposedly fixed in SP1.

Apart from trawling the net, not sure I can tell you what's wrong since it works fine here on both physical and virtual XP setups.  The only thing I can think of is that the output from devcon is appearing faster than the system is able to set up a pipe to find or vice versa.

You could try disabling any AV you have running just in case that is causing a delay due to scanning the system executables, (you could try excluding devcon and find from the AV).

You could also try substituting findstr for find, (probably won't make a difference but who knows): devcon status "*DEV_001C*" | findstr /i "disabled" >NUL

In the meantime a small update to VIndicator, that'll be it until I read up a bit more on Dll calls, (which are extremely confusing), to get rid of the rasdial dependency.

pilgrim:
The Netbook is pretty slow which is why 'sleep' was added between the 'start' items, and because Peerblock always tries to check everything when it starts, its icon still opens several seconds after the connection is made.

If devcon's speed was an issue surely that would affect my existing batch file as well?

I don't think the AV is affecting things as I was trying the script out after the computer had been running for some time and according to the Task Manager nearly all the CPU usage was on the System Idle Process and the AV wasn't showing any.

Don't waste any more time on it unless you want to, the batch file in my last post works every time, all I was trying to do was loose the flag file anyway.  :)


Thanks for the update to VIndicator, I was intending to ask you today if it was ready for a wider audience yet?
I also have a couple of other questions about it:

You have mentioned before about getting away from its dependency on rasdial but as the most recent versions have proved reliable is there any particular reason for doing so?

Log files: When I moved the latest update into the folder I am running it from I noticed that it is creating a separate log file for each day that it is run, they are I admit only 1kb each but is there any built in limit to their number?
If not, once you decide you have gone as far as you can with the program and do not need possible debug information any more will there be an actual need for them?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version