From fa8ae96aba4b56698346486427ab808fdb1dd374 Mon Sep 17 00:00:00 2001 From: CorpNewt <12772521+corpnewt@users.noreply.github.com> Date: Sat, 14 Mar 2020 13:41:23 -0500 Subject: [PATCH] Attempt to self-elevate in python --- MakeInstall.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MakeInstall.py b/MakeInstall.py index d225a38..b953db5 100755 --- a/MakeInstall.py +++ b/MakeInstall.py @@ -5,6 +5,10 @@ class WinUSB: def __init__(self): 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 # Make sure we're on windows self.verify_os()