REM +=======================================================+ REM | Comment out what you don't need. These are mostly | REM | examples to give you an idea of how it all works. | REM +=======================================================+ REM +=======================================================+ REM | Finding CDROM driveletter | REM |-------------------------------------------------------| set tagfile=\WIN51 for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist "%%i:%tagfile%" set CDDRIVE=%%i: REM +=======================================================+ REM +=======================================================+ REM | We should be already in system32, this is just to be | REM | sure | REM |-------------------------------------------------------| %SystemDrive% cd %SystemRoot%\system32 REM +=======================================================+ REM +=======================================================+ REM | Trick Windows into identifying the original setup.exe | REM | deleting the setup.exe will not work, just rename it | REM |-------------------------------------------------------| if exist setup.exe ren setup.exe setupold.exe if exist setupORG.exe ren setupORG.exe setup.exe REM +=======================================================+ %CDDRIVE%\Drivers\SetDevicePath.exe %CDDRIVE%\Drivers start %CDDRIVE%\Drivers\WatchDriverSigningPolicy.exe REM +=======================================================+ REM | Finally start the installation with the originally | REM | given parameters | REM |-------------------------------------------------------| start /WAIT setup.exe %* REM +=======================================================+