分享:
▲
▼
1.光碟中新增一各$OEM$资料夹 2.$OEM$资料夹内新增CMDLINES.TXT 及 RUNONCEEX.CMD两个档案
CMDLINES.TXT内容为: ---------------- [COMMANDS] "RunOnceEx.cmd" ----------------
RUNONCEEX.CMD内容为: ------------------------------------------------------- @echo off
REM Finding CDROM driveletter set tagfile=\WIN51 FOR %%i IN (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 CDROM=%%i:
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY%\010 /VE /D "WPI" /f REG ADD %KEY%\010 /V 1 /D "%CDROM%\WPI\WPI.cmd " /f
EXIT -------------------------------------------------------- WPI.cmd内容为: ------------------------------------------------------- @ECHO OFF
REM Example, how to look for CDROM-drive. Must have WPI.ico at the root of the CD. 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:\wpi.ico set CDROM=%%i: echo Found CD-Rom as drive %CDROM%
REM Determine the WPI startup path. REM if wpi should run off the cd the replace %~dp0 with %cdrom%. set wpipath=%~dp0
REM Hide this command window. REM cmdow.exe @ /hid
REM Force resolution to needed size for wpi interface. REM start %wpipath%\Tools\VideoChanger.exe 1024x768x16@60 -q
REM Font installation - the smooth and customizable way. REM start /wait %wpipath%\Tools\fonts\fontinstaller.exe REM Special registry tweak needed. regedit /s "%wpipath%\common\wpi.reg
REM Make WPI directory the current directory. for /f "delims=: tokens=1" %%i in ("%wpipath%") do %%i: cd "%wpipath%"
REM Start WPI and wait for its end start /wait %windir%\system32\mshta.exe "%CD%\wpi.hta"
exit ------------------------------------------------------- WPI.cmd与wpi.hta放同一资料夹内
|