Advertisement
QuantumWarpCode

Create Shortcut

Sep 24th, 2014
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set wshShell = WScript.CreateObject("WScript.Shell")
  2.  
  3. Set argL = WScript.Arguments
  4. user = argL(0)
  5. loc = argL(1)
  6.  
  7. Set lnk = wshShell.CreateShortcut(loc)
  8.  
  9. lnk.TargetPath = user & "\AppData\Roaming\shutdown.bat"
  10. lnk.Arguments = ""
  11. lnk.Description = "Shutdown"
  12. lnk.IconLocation = user & "\AppData\Roaming\shutdown.bat, 0"
  13. lnk.WindowStyle = "1"
  14. lnk.WorkingDirectory = "C:\temp"
  15. lnk.Save()
  16. Set lnk = Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement