-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bat file for quick create lnk in the startup folder.
- Loading branch information
1 parent
2f5c916
commit af47034
Showing
3 changed files
with
21 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@echo off | ||
|
||
set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs" | ||
|
||
echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT% | ||
echo sLinkFile = "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\GSimpleWinSleepPreventer.lnk" >> %SCRIPT% | ||
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT% | ||
echo oLink.TargetPath = "%~dp0\GSimpleWinSleepPreventer.exe" >> %SCRIPT% | ||
echo oLink.Arguments = "-s" >> %SCRIPT% | ||
echo oLink.Save >> %SCRIPT% | ||
|
||
cscript /nologo %SCRIPT% | ||
del %SCRIPT% |