-
Notifications
You must be signed in to change notification settings - Fork 74
/
sch_On.bat
18 lines (18 loc) · 1.39 KB
/
sch_On.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
::schtasks /CREATE /XML .\AltSnap.xml /TR "%~dp0AltSnap.exe"
:: If you do not want to use the xml file you can use:
:: schtasks.exe /CREATE /TN "AltSnap" /TR "%~dp0AltSnap.exe" /SC onlogon /RL highest /DELAY 0:10
:: However AltSnap will be killed after 3 days by default.
:: The only way not to have this autokill is to use an xml file.
:: Make sure to adjust the path to the AltSnap executable in the AltSnap.xml file.
@echo =======================================================================================================
@echo = Setup Scheduled task for elevated AltSnap auto-start without UAC prompt =
@echo = Make sure you are running this from an elevated shell =
@echo = Default AltSnap executable location is %%APPDATA%%\AltSnap\AltSnap.exe =
@echo = Adjust the executable location in AltSnap.xml file if AltSnap is installed in a different location =
@echo = If you do not want to continue, close the window or hit Ctrl+C =
@echo =======================================================================================================
@echo Going to run command:
@echo schtasks.exe /CREATE /XML .\AltSnap.xml /TN "AltSnap" %1 %2 %3 %4 %5 %6 %7 %8 %9
@pause
schtasks.exe /CREATE /XML .\AltSnap.xml /TN "AltSnap" %1 %2 %3 %4 %5 %6 %7 %8 %9
@pause