Attempt to self-elevate in python

This commit is contained in:
CorpNewt 2020-03-14 13:41:23 -05:00 committed by GitHub
parent 9f3a750f56
commit fa8ae96aba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,10 @@ class WinUSB:
def __init__(self): def __init__(self):
self.u = utils.Utils("MakeInstall") self.u = utils.Utils("MakeInstall")
if not self.u.check_admin():
# Try to self-elevate
self.u.elevate(os.path.realpath(__file__))
exit()
self.min_plat = 9600 self.min_plat = 9600
# Make sure we're on windows # Make sure we're on windows
self.verify_os() self.verify_os()