Skip to content

Instantly share code, notes, and snippets.

@huyinghuan
Created March 10, 2018 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huyinghuan/0db6f4e0636fcd1b6b5499481cb12a4a to your computer and use it in GitHub Desktop.
Save huyinghuan/0db6f4e0636fcd1b6b5499481cb12a4a to your computer and use it in GitHub Desktop.
set WshShell = WScript.CreateObject("WScript.Shell" )
Set FSO = CreateObject("Scripting.FileSystemObject")
strDesktop = WshShell.SpecialFolders("Startup" )
set oShellLink = WshShell.CreateShortcut(strDesktop & "\AutoUpdate.lnk" )
desktopDir = WshShell.SpecialFolders("Desktop")
oShellLink.TargetPath = FSO.BuildPath(desktopDir, "novel\AutoUpdate.exe")
oShellLink.WindowStyle = 1
oShellLink.WorkingDirectory = FSO.BuildPath(desktopDir, "novel")
oShellLink.Save
Msgbox "Startup Success",0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment