-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c826702
commit 5f4e880
Showing
2 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
@echo off | ||
|
||
if not exist "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\XBatteryStatus.exe" ( | ||
echo Already uninstalled | ||
goto end | ||
) | ||
|
||
goto check_Permissions | ||
|
||
:check_Permissions | ||
echo Administrative permissions required. Detecting permissions... | ||
|
||
net session >nul 2>&1 | ||
if %errorLevel% == 0 ( | ||
echo Success: Administrative permissions confirmed. | ||
echo Success: Administrative permissions confirmed | ||
) else ( | ||
echo Failure: Current permissions inadequate. | ||
echo Failure: Current permissions inadequate. Run as Administrator | ||
goto end | ||
) | ||
|
||
pause >nul | ||
echo[ | ||
|
||
taskkill /IM "XBatteryStatus.exe" /F | ||
timeout /T 1 /nobreak | ||
del "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\XBatteryStatus.exe" /Y | ||
timeout /T 1 /nobreak >nul | ||
del "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\XBatteryStatus.exe" | ||
|
||
if %errorLevel% == 0 ( | ||
echo[ | ||
echo Success: Uninstallation successful | ||
) else ( | ||
echo[ | ||
echo Failure: Uninstallation unsuccessful | ||
) | ||
|
||
:end | ||
pause |