Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Turning device off by command line?
Name: Herb_Davis_Y2K Date: June 1, 2009 at 13:31:19 Pacific OS: Windows XP Subcategory: Batch
Comment:
I can't get this batch file to work: FOR /F "tokens=* delims=: " %%R IN ('devcon status *DEV_1677* ^| FIND "running"') DO SET STATUS=%%R IF %STATUS% == "Driver is running." devcon disable *DEV_1677*
Name: Herb_Davis_Y2K Date: June 2, 2009 at 05:14:11 Pacific
Reply:
Thank you! How could I expand it to be a toggle for said device? Something like this?
:Status FOR /F "tokens=* delims=: " %%R IN ('devcon status *DEV_1677* ^| FIND "running"') DO SET STATUS=%%R if not errorlevel 1 GOTO DISABLE ELSE GOTO ENABLE
Summary: In batch files you can refer to command line arguments with %. Example: @echo off echo j | deltree %1 > nul The %1 in the batch file will be replaced by the first argument. %0 is the batch-file itself...
Summary: This is my first time on this forum, so I'm guessing it's for anything programming related. I was wondering if someone could help me with Borland's free command line tools. I've been trying to compi...