Dans ce cas-ci:
Code : Tout sélectionner
$sUserName = "JamesSt-P"
$sPassword = ""
If IsAdmin() Then
MsgBox(0, "", "Admin rights detected")
Exit
EndIf
If not IsAdmin() Then
MsgBox(0, "", "Admin rights NOT detected")
RunAs($sUserName, @ComputerName, $sPassword, 0, @ScriptFullPath)
Exit
EndIf
Merci


