Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Shortcut(Application,Name,Location,Icon,Hotkey)
- Dim objShell,DesktopPath,objShortCut,MyTab
- If IsEmpty(Icon) Then
- Icon = "winver.exe,0"
- End If
- If IsEmpty(Hotkey) Then
- NoHotkey = True
- End If
- Set objShell = CreateObject("WScript.Shell")
- MyTab = Split(Application,"\")
- If Name = "" Then
- Name = MyTab(UBound(MyTab))
- End if
- Set objShortCut = objShell.CreateShortcut(DblQuote(Location & "\" & Name & ".lnk"))
- With objShortCut
- .TargetPath = DblQuote(Application)
- .IconLocation = Icon
- If Not(NoHotkey) Then
- .Hotkey = Hotkey
- End If
- .Save
- End With
- End Sub
- Sub DblQuote(Str)
- DblQuote = Chr(34) & Str & Chr(34)
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement