Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. Dim WshShell As Object, oShellLink As Object
  2.  
  3. WshShell = CreateObject("WScript.Shell")
  4.  
  5.  
  6. oShellLink = WshShell.CreateShortcut("\Shortcut Script.lnk") 'Should look something like this, WshShell.createshortcut(txtText.text & "\MyShortcut.lnk")
  7.  
  8. oShellLink.TargetPath = "C:\" 'Path of .exe EX: C:\MyProgram.exe
  9. oShellLink.WindowStyle = 1
  10. oShellLink.Hotkey = "CTRL+SHIFT+F" 'Not needed, but left it there.
  11. oShellLink.IconLocation = "notepad.exe, 0" 'Custom icon, would use the location of the program. EX: C:\program files\My Software\Program.exe (unless the icon is located in the same folder
  12. oShellLink.Description = "Shortcut Script"
  13. oShellLink.WorkingDirectory = Nothing 'txtText.text
  14. oShellLink.Save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement