Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- full_command_line := DllCall("GetCommandLine", "str")
- if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
- {
- try
- {
- if A_IsCompiled
- Run *RunAs "%A_ScriptFullPath%" /restart
- else
- Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
- ExitApp
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement