mritter Posted February 5, 2006 Posted February 5, 2006 (edited) Lawrenca, Doc Symbiosis, Kels, and myself have been talking about updating WPI.cmd to remove some clutter and find a better CD check. This is what I have come up with.It uses all the existing code, just in a different manner. It scans the %~dp0 to find the %wpipath%, nothing new. But it sets %drive% to just the drive name, ie, C:, D:, E:, W:, etc. This would be used as the cdrom if launched from cd/dvd.If %drive% is actually a harddrive, then you have to change the paths accordingly. The only one in my WPI.cmd would be the clean up script. As is, if you launched it from hd, the file would not be found. No big deal. No error message, no abort. If it was launched from cd, it will run the script.@ECHO OFFREM Determine startup path and drive letter.for /f "delims=: tokens=1" %%i in ("%~dp0") do set drive=%%i:set wpipath=%~dp0%wpipath%\Tools\cmdow.exe @ /hidREM Force resolution to needed size for wpi interface.REM %wpipath%\Tools\ResChange.exe -width=1280 -height=1024 -depth=max -refresh=maxREM Font installation - the smooth and customizable way.REM start /wait %wpipath%\Tools\Fonts\FontInstaller.exeREM Special registry tweak needed.regedit /s %wpipath%\Common\WPI.regREM Start WPI and wait for it to end.%wpipath%\WPI.htaREM Undo registry tweak.regedit /s %wpipath%\Common\Undo.regREM Clean up script.REM %drive%\$OEM$\CleanUp.cmdREM Rebooting the sytem to finalize the installation process.REM shutdown.exe -r -f -t 60 -c "To finish installations WPI will now reboot in 60 sec..."exitI like the "less is more" thinking for scripts like this. Edited February 5, 2006 by mritter
mritter Posted February 6, 2006 Author Posted February 6, 2006 This is my RunOnceEx.cmd file with similar updates:cmdow @ /HID@ECHO OFFfor /f "delims=: tokens=1" %%i in ("%~dp0") do set drive=%%i:set wpipath=%drive%\install\wpiSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY%\001 /V 1 /D "%wpipath%\WPI.cmd" /fEXIT
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now