-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathsch_Off.bat
More file actions
45 lines (37 loc) · 1.56 KB
/
sch_Off.bat
File metadata and controls
45 lines (37 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@echo off
:: Check for elevation
fsutil dirty query %systemdrive% >nul 2>&1
if '%errorlevel%' NEQ '0' (
:: Not elevated, so relaunch using vbscript
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "cmd.exe", "/c ""%~f0"" %*", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /b
)
setlocal
:: =============================================================================
:: = This batch will remove the AltSnap's Scheduled task! =
:: = If you do not want to continue, close the window or hit Ctrl+C =
:: =============================================================================
echo =============================================================================
echo = This batch will remove the AltSnap's Scheduled task! =
echo = If you do not want to continue, close the window or hit Ctrl+C =
echo =============================================================================
echo.
echo Going to run command:
echo schtasks.exe /DELETE /TN "AltSnap" %1 %2 %3 %4 %5 %6 %7 %8 %9
echo.
set /p "choice=Are you sure you want to delete the AltSnap scheduled task? [Y/n]: "
:: Handle empty input (user just pressed Enter) as "Y"
if "%choice%"=="" (
set "choice=y"
)
if /i "%choice%" equ "y" (
echo Deleting the AltSnap scheduled task...
schtasks.exe /DELETE /TN "AltSnap" %1 %2 %3 %4 %5 %6 %7 %8 %9 /F
) else (
echo Deletion cancelled.
)
pause
exit /b 0