So I changed the AUTORUN.INF file to run a batch file that opens the folder and runs the power saver. Here are the new contents of the AUTORUN.INF file.
[autorun]
;open=Kathys_Autorun.bat
ShellExecute=Kathys_Autorun.bat
Label=Tim's 500 GB USB External Drive
Here are the contents of the called batch file, Kathys_Autorun.bat. (In the first "paragraph," each line begins with "echo." I'm not going to bother dealing with the word wrap that is happening on the blog page.)
echo off
echo Turn off standby (e.g., switch to the PRESENTATION mode of POWER SAVER)
echo while using an external USB drive to prevent going into standby and
echo thus causing DELAYED WRITE FAILURES.
echo .
echo Better yet, remember to EJECT the USB drive when you are done with it.
REM Bring up an Explorer window for the USB drive.
echo .
echo (1 of 2) Ready to open an Explorer window.
pause
start explorer.exe /select,Kathys_Autorun.bat
REM First try running the Toshiba Power Saver.
REM If that fails, try the Windows Power Saver.
echo .
echo (2 of 2) Ready to run Power Saver.
pause
control.exe TPwrSave.cpl
if %errorlevel% 1 start powercfg.exe /setactive presentation
The batch file displays a message, opens the USB drive folder in explorer, and starts the power saver utility.
I added something to run the Windows power saver if the Toshiba one fails to start. Hopefully someone will let me know if that works.
No comments:
Post a Comment