Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save handcraftsman/365239 to your computer and use it in GitHub Desktop.
Save handcraftsman/365239 to your computer and use it in GitHub Desktop.
for /F "skip=6 tokens=1" %%i in ('WHOAMI /PRIV') do SET %%i=1
if not defined SeImpersonatePrivilege (
echo This script must be run as an administrator
exit /b
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment