je fais appel a ceux qui maitrise bien autoit
comment réécrire ce code dos sous une programmation autoit ? je planche depuis un bon moment dessus mais sans y arriver
Code : Tout sélectionner
:: Running Admin shell
:: =============================
::
:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
::
:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
::
:: **************************************
:: Invoking UAC for Privilege Escalation
:: **************************************
::
setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B
:gotPrivileges
::::::::::::::::::::::::::::
::START
::::::::::::::::::::::::::::
::
setlocal enableDelayedExpansion
::
::set thisDir=%~dp0
::@set SOURCEPATH=%~dp0
::
Merci par avance pour l'aide que vous pourrez m'apporter
