Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim WshShell As Object, oShellLink As Object
- WshShell = CreateObject("WScript.Shell")
- oShellLink = WshShell.CreateShortcut("\Shortcut Script.lnk") 'Should look something like this, WshShell.createshortcut(txtText.text & "\MyShortcut.lnk")
- oShellLink.TargetPath = "C:\" 'Path of .exe EX: C:\MyProgram.exe
- oShellLink.WindowStyle = 1
- oShellLink.Hotkey = "CTRL+SHIFT+F" 'Not needed, but left it there.
- 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
- oShellLink.Description = "Shortcut Script"
- oShellLink.WorkingDirectory = Nothing 'txtText.text
- oShellLink.Save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement