Makcalable wrote:
Thanks to TazDevilLooney, but I can't get that code to work for me. It doesn't pass any arguments when relaunched elevated.
This is probably a more robust way of checking permissions:
whoami /groups | find "S-1-16-12288" >nul
if "%errorlevel%"=="0" (
echo elevated
) else (
echo not elevated
)