|
//////////////////////////////以下是子程序////////////////////////////////////////
//子程序一律以_SUB XXXX(XXX为子程序的名称)开头,以_END结束
_SUB SWITCHTOADMINQUESTION
// Enable Mouse Cursor RegWrite,HKLM,0x4,Tmp_Software\Microsoft\Windows\CurrentVersion\Policies\System,EnableCursorSuppression,0 or Exec =Winpeshl.exe
//EXEC =%WinDir%\System32\winpeshl.exe
ENVI logon_script=X:\PEMaterial\pecmd.lua
EXEC ="%ProgramFiles%\WinXShell\WinXShell.exe" -ui -jcfg X:\PEMaterial\UI_LogonPE.jcfg
TEAM SET YESNO=NO|IFEX #2=%ERRORLEVEL%,SET YESNO=YES
//TEAM SET YESNO=NO|IFEX #2=%ERRORLEVEL%,SET YESNO=NO
ENVI logon_script
//LOGO %WinDir%\web\wallpaper\Windows\img0.jpg
//ENVI logon_script=X:\PEMaterial\pecmd.lua
EXEC ="%ProgramFiles%\WinXShell\WinXShell.exe" -ui -jcfg X:\PEMaterial\UI_LogonPE.jcfg
TEAM SET YESNO=NO|IFEX #2=%ERRORLEVEL%,SET YESNO=YES
ENVI logon_script
LOGO %WinDir%\web\wallpaper\Windows\img0.jpg
//MESS Switch to Administrator? @Switch to Administrator #YN *10000 $N
FIND $%YESNO%=YES,TEAM ENVI $*DO_ADMIN=1 | CALL ADMIN
FIND $%YESNO%=NO,LOAD %WinDir%\System32\Pecmd.ini
_END
反复有3次用户确认啊。
原始PECMDADMIN.ini只保留
- ////////////////////////////////////////////////////////////////////////////////////////////////
- _SUB SWITCHTOADMINQUESTION
- LOGO %WinDir%\web\wallpaper\Windows\img0.jpg
- MESS Switch to Administrator? @Switch to Administrator #YN *3000 $N
- FIND $%YESNO%=YES,CALL ADMIN
- FIND $%YESNO%=NO,LOAD %WinDir%\System32\Pecmd.ini
- _END
复制代码
这样你final.bat最后,会把这部分替换掉。
或者你直接 PECMDADMIN.ini提前写好:
- _SUB SWITCHTOADMINQUESTION
- //ENVI logon_script=X:\PEMaterial\pecmd.lua
- EXEC ="%ProgramFiles%\WinXShell\WinXShell.exe" -ui -jcfg X:\PEMaterial\UI_LogonPE.jcfg
- TEAM SET YESNO=NO|IFEX #2=%ERRORLEVEL%,SET YESNO=YES
- ENVI logon_script
- LOGO %WinDir%\web\wallpaper\Windows\img0.jpg
- FIND $%YESNO%=YES,CALL ADMIN
- FIND $%YESNO%=NO,LOAD %WinDir%\System32\Pecmd.ini
- _END
复制代码
就不要final.bat替换文本内容了。
|
|