123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354 |
- @echo off
- rem ================================================================================
- for %%a in ("%~dp0\.") do set "SnPatchVersion=%%~nxa"
- rem ================================================================================
- rem ‚�ˆŒ€�ˆ…!!! ’¥ªáâ á®®¡é¥¨© ¤«ï ¢ë¢®¤ ¢ ä ©« ᤥ« ¢ ª®¤¨à®¢ª¥ CP1251!
- rem ================================================================================
- rem ‘®åà 塞 ⥪ãéãî ª®¤®¢ãî áâà ¨æã
- for /f "tokens=2 delims=:" %%i in ('chcp') do (set codepage_old=%%i)
- set codepage_old=%codepage_old:~1,9%
- rem ================================================================================
- rem �஢¥àª «¨ç¨¥ ¯à ¢ ¤¬¨¨áâà â®à
- if '%1'=='ELEV' (shift /1 & goto Install)
- >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
- if %errorlevel% neq 0 (
- goto Elevate
- )
- :Install
- rem ================================================================================
- rem �ਠ«¨ç¨¨ ¯ à ¬¥âà íâ® ¤®«¦¥ ¡ëâì ª â «®£ ¤«ï «®£®¢ ãáâ ®ª¨ ¯ âç
- set log_dir=%~1
- if ^"%log_dir%^" neq "" (
- set fin=%log_dir:~-1%
- if "%fin%" neq "\" (set log_dir=%log_dir%\)
- )
- rem ================================================================================
- rem �®«ã票¥ ¯ã⥩
- rem �ãâì ¤«ï á¥à¢¥à ¡¥§®¯ á®áâ¨
- reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v SecurityServerDir > nul 2> nul
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïîëó÷èòü ïóòü óñòàíîâêè ïðîäóêòà"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯®«ãç¨âì ¯ãâì ãáâ ®¢ª¨ ¯à®¤ãªâ "
- )
- FOR /F "usebackq tokens=2,* skip=2" %%L IN (
- `reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v SecurityServerDir`
- ) DO SET serverpath=%%M
- if %serverpath:~-1% EQU \ set serverpath=%serverpath:~0,-1%
- rem �ã⨠á¨á⥬ëå ä ©«®¢
- set Sys32=%systemroot%\System32
- set SysWOW=%systemroot%\SysWOW64
- rem �ãâì ¤à ©¢¥à®¢
- rem set SysDrv=%systemroot%\System32\drivers
- rem ================================================================================
- rem Žá®¢ ï à ¡®â ¯® ãáâ ®¢ª¥ ¯ âç
- rem Ž¯¥à æ¨ï ¢ § ¢¨á¨¬®á⨠®â à §à冷áâ¨
- if "%PROCESSOR_ARCHITECTURE%"=="x86" (
- call :PatchX86
- ) else (
- call :PatchX64
- )
- rem ================================================================================
- if "%log_dir%" neq "" (
- chcp 1251 >nul 2>&1
- echo Ïàò÷ óñòàíîâëåí óñïåøíî > "%log_dir%success.%computername%.%userdomain%.patch_%SnPatchVersion%.log"
- chcp %codepage_old% >nul 2>&1
- ) else (
- color 0A
- echo � âç ãáâ ®¢«¥ ãᯥè®
- pause
- )
- exit /b
- rem ================================================================================
- :PatchX64
- rem ‡ ¬¥ ä ©« á á®åà ¥¨¥¬ áâ ன ¢¥àᨨ
- Setlocal EnableDelayedExpansion
- call :GetVersion "%serverpath%\LacusActivities.dll"
- Setlocal DisableDelayedExpansion
- ren "%serverpath%\LacusActivities.dll" "LacusActivities.dll%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë LacusActivities.dll"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« LacusActivities.dll"
- )
- copy "%~dp0Module\x64\LacusActivities.dll" "%serverpath%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë LacusActivities.dll"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« LacusActivities.dll"
- )
- ren "%serverpath%\en-US\LacusActivities.dll.mui" "LacusActivities.dll.mui%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë en-US\LacusActivities.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« en-US\LacusActivities.dll.mui"
- )
- copy "%~dp0Module\x64\en-US\LacusActivities.dll.mui" "%serverpath%\en-US"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë en-US\LacusActivities.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« en-US\LacusActivities.dll.mui"
- )
- ren "%serverpath%\ru-RU\LacusActivities.dll.mui" "LacusActivities.dll.mui%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë ru-RU\LacusActivities.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« ru-RU\LacusActivities.dll.mui"
- )
- copy "%~dp0Module\x64\ru-RU\LacusActivities.dll.mui" "%serverpath%\ru-RU"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë ru-RU\LacusActivities.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« ru-RU\LacusActivities.dll.mui"
- )
- rem ‡ ¬¥ ä ©« á á®åà ¥¨¥¬ áâ ன ¢¥àᨨ
- Setlocal EnableDelayedExpansion
- call :GetVersion "%serverpath%\LacusFramework.dll"
- Setlocal DisableDelayedExpansion
- ren "%serverpath%\LacusFramework.dll" "LacusFramework.dll%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë LacusFramework.dll"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« LacusFramework.dll"
- )
- copy "%~dp0Module\x64\LacusFramework.dll" "%serverpath%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë LacusFramework.dll"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« LacusFramework.dll"
- )
- ren "%serverpath%\en-US\LacusFramework.dll.mui" "LacusFramework.dll.mui%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë en-US\LacusFramework.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« en-US\LacusFramework.dll.mui"
- )
- copy "%~dp0Module\x64\en-US\LacusFramework.dll.mui" "%serverpath%\en-US"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë en-US\LacusFramework.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« en-US\LacusFramework.dll.mui"
- )
- ren "%serverpath%\ru-RU\LacusFramework.dll.mui" "LacusFramework.dll.mui%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë ru-RU\LacusFramework.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« ru-RU\LacusFramework.dll.mui"
- )
- copy "%~dp0Module\x64\ru-RU\LacusFramework.dll.mui" "%serverpath%\ru-RU"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë ru-RU\LacusFramework.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« ru-RU\LacusFramework.dll.mui"
- )
- rem ‡ ¬¥ ä ©« á á®åà ¥¨¥¬ áâ ன ¢¥àᨨ
- Setlocal EnableDelayedExpansion
- call :GetVersion "%serverpath%\LacusRuntime.dll"
- Setlocal DisableDelayedExpansion
- ren "%serverpath%\LacusRuntime.dll" "LacusRuntime.dll%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë LacusRuntime.dll"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« LacusRuntime.dll"
- )
- copy "%~dp0Module\x64\LacusRuntime.dll" "%serverpath%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë LacusRuntime.dll"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« LacusRuntime.dll"
- )
- ren "%serverpath%\en-US\LacusRuntime.dll.mui" "LacusRuntime.dll.mui%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë en-US\LacusRuntime.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« en-US\LacusRuntime.dll.mui"
- )
- copy "%~dp0Module\x64\en-US\LacusRuntime.dll.mui" "%serverpath%\en-US"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë en-US\LacusRuntime.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« en-US\LacusRuntime.dll.mui"
- )
- ren "%serverpath%\ru-RU\LacusRuntime.dll.mui" "LacusRuntime.dll.mui%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë ru-RU\LacusRuntime.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« ru-RU\LacusRuntime.dll.mui"
- )
- copy "%~dp0Module\x64\ru-RU\LacusRuntime.dll.mui" "%serverpath%\ru-RU"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë ru-RU\LacusRuntime.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« ru-RU\LacusRuntime.dll.mui"
- )
- rem ‡ ¬¥ ä ©« á á®åà ¥¨¥¬ áâ ன ¢¥àᨨ
- Setlocal EnableDelayedExpansion
- call :GetVersion "%serverpath%\LacusServices.dll"
- Setlocal DisableDelayedExpansion
- ren "%serverpath%\LacusServices.dll" "LacusServices.dll%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë LacusServices.dll"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« LacusServices.dll"
- )
- copy "%~dp0Module\x64\LacusServices.dll" "%serverpath%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë LacusServices.dll"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« LacusServices.dll"
- )
- ren "%serverpath%\en-US\LacusServices.dll.mui" "LacusServices.dll.mui%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë en-US\LacusServices.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« en-US\LacusServices.dll.mui"
- )
- copy "%~dp0Module\x64\en-US\LacusServices.dll.mui" "%serverpath%\en-US"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë en-US\LacusServices.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« en-US\LacusServices.dll.mui"
- )
- ren "%serverpath%\ru-RU\LacusServices.dll.mui" "LacusServices.dll.mui%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë ru-RU\LacusServices.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« ru-RU\LacusServices.dll.mui"
- )
- copy "%~dp0Module\x64\ru-RU\LacusServices.dll.mui" "%serverpath%\ru-RU"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë ru-RU\LacusServices.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« ru-RU\LacusServices.dll.mui"
- )
- rem ‡ ¬¥ ä ©« á á®åà ¥¨¥¬ áâ ன ¢¥àᨨ
- Setlocal EnableDelayedExpansion
- call :GetVersion "%serverpath%\OmsServer.dll"
- Setlocal DisableDelayedExpansion
- ren "%serverpath%\OmsServer.dll" "OmsServer.dll%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë OmsServer.dll"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« OmsServer.dll"
- )
- copy "%~dp0Module\x64\OmsServer.dll" "%serverpath%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë OmsServer.dll"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« OmsServer.dll"
- )
- ren "%serverpath%\en-US\OmsServer.dll.mui" "OmsServer.dll.mui%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë en-US\OmsServer.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« en-US\OmsServer.dll.mui"
- )
- copy "%~dp0Module\x64\en-US\OmsServer.dll.mui" "%serverpath%\en-US"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë en-US\OmsServer.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« en-US\OmsServer.dll.mui"
- )
- ren "%serverpath%\ru-RU\OmsServer.dll.mui" "OmsServer.dll.mui%file_old_version%"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ïåðåèìåíîâàòü çàìåíÿåìûé ôàéë ru-RU\OmsServer.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ¯¥à¥¨¬¥®¢ âì § ¬¥ï¥¬ë© ä ©« ru-RU\OmsServer.dll.mui"
- )
- copy "%~dp0Module\x64\ru-RU\OmsServer.dll.mui" "%serverpath%\ru-RU"
- if "%log_dir%" neq "" (
- call :CheckStatus "[ÎØÈÁÊÀ] Íå óäàëîñü ñêîïèðîâàòü îáíîâë¸ííûé ôàéë ru-RU\OmsServer.dll.mui"
- ) else (
- call :CheckStatus "[Ž˜ˆ�Š€] �¥ 㤠«®áì ᪮¯¨à®¢ âì ®¡®¢«ñë© ä ©« ru-RU\OmsServer.dll.mui"
- )
- exit /b
- rem ================================================================================
- :GetVersion
- set file_old_version=_
- set file_path=%1
- set file_double_path=!file_path:\\=\!
- set file_double_path=!file_double_path:\=\\!
- set file_full_ver=
- wmic datafile where name^=!file_double_path! get Version /value >nul 2>&1
- for /F "delims=" %%a in ('wmic datafile where name^=!file_double_path! get Version /value') do (
- set file_full_ver=!file_full_ver!%%a
- )
- set file_ver=
- for /F "tokens=3 delims=.," %%a in ("!file_full_ver!") do set file_ver=!file_ver!_%%a
- for /F "tokens=4 delims=.," %%a in ("!file_full_ver!") do set file_ver=!file_ver!_%%a
- set file_old_version=!file_ver!
- exit /b
- rem ================================================================================
- :CheckStatus
- if %errorlevel% neq 0 (
- if "%log_dir%" neq "" (
- chcp 1251 >nul 2>&1
- echo %~1 > "%log_dir%fail.%computername%.%userdomain%.patch_%SnPatchVersion%.log"
- chcp %codepage_old% >nul 2>&1
- ) else (
- color 0C
- echo.
- echo %~1
- echo.
- pause
- )
- exit
- )
- exit /b
- rem ================================================================================
- rem ‡ ¯ã᪠áªà¨¯â á ¯®¢ë襨¥¬ (UAC)
- :Elevate
- set "vbsGetPrivileges=%temp%\SNgetPriv_%~n0.vbs"
- echo.
- echo **************************************
- echo Running as administrator
- echo **************************************
- echo Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
- echo args = "ELEV " >> "%vbsGetPrivileges%"
- echo For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
- echo args = args ^& strArg ^& " " >> "%vbsGetPrivileges%"
- echo Next >> "%vbsGetPrivileges%"
- echo args = "/c """ + "%~f0" + """ " + args >> "%vbsGetPrivileges%"
- echo UAC.ShellExecute "%SystemRoot%\system32\cmd.exe", args, "", "runas", 1 >> "%vbsGetPrivileges%"
- rem echo UAC.ShellExecute "%~f0", args, "", "runas", 1 >> "%vbsGetPrivileges%"
- "%SystemRoot%\system32\WScript.exe" "%vbsGetPrivileges%" %*
- exit /b
|