From a75e171be4a8d157bb26700bcd8d000e9f692667 Mon Sep 17 00:00:00 2001 From: E-Soda <64815861+E-Soda@users.noreply.github.com> Date: Sat, 15 May 2021 19:06:26 -0700 Subject: [PATCH] Automatically Obtain Admin Permission --- 5kblHotspotHelper.bat | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/5kblHotspotHelper.bat b/5kblHotspotHelper.bat index 0004118..7905766 100644 --- a/5kblHotspotHelper.bat +++ b/5kblHotspotHelper.bat @@ -1,20 +1,7 @@ @echo off -goto check_Permissions - -:check_Permissions - - net session >nul 2>&1 - if %errorLevel% == 0 ( - goto setup - ) else ( - echo. - echo Please run this script again with admininstrator priviliges. - echo. - pause - exit - - ) +%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit +cd /d "%~dp0" :setup setlocal enableDelayedExpansion