/////////////////////////////////////////
//    Switch to Administrator Init     //
/////////////////////////////////////////

TEAM LOGS %WinDir%\System32\PecmdAdmin.log

//CALL ADMIN
CALL SWITCHTOADMINQUESTION
EXIT

////////////////////////////////////////////////////////////////////////////////////////////////
_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

// MESS Switch to Administrator? @Switch to Administrator #YN *3000 $N
EXEC ="%ProgramFiles%\WinXShell\WinXShell.exe" -ui -jcfg "X:\PEMaterial\UI_LogonPE.jcfg"
TEAM SET YESNO=NO|IFEX #2=%ERRORLEVEL%,SET YESNO=YES
FIND $%YESNO%=YES,CALL ADMIN
LOAD %WinDir%\System32\Pecmd.ini

_END
////////////////////////////////////////////////////////////////////////////////////////////////
_SUB ADMIN
LOGO %WinDir%\web\wallpaper\Windows\img0.jpg
TEXT Switch to Administrator, please wait... # 0xFFFFFF L59 T39 $20*

IFEX %WinDir%\System32\winpeshl.log,!EXEC %WinDir%\System32\winpeshl.exe

CALL $Netapi32.dll,NetJoinDomain,,WORKGROUP,,,,1
EXEC !=LogonAdmin.bat PECMD
// TEXT Waiting for SYSTEM session ... # 0xFFFFFF L59 T39 $20*
EXEC ="%ProgramFiles%\WinXShell\WinXShell.exe" -luacode WaitForSession('SYSTEM')
TEXT "" # 0xFFFFFF L59 T39 $20*_END
////////////////////////////////////////////////////////////////////////////////////////////////