1
2
3
4
5
6
7
8
9
10
|
Private Function MakeShortcut(ByVal File As String, ByVal ShortcutFolder As String, ByVal Name As String, ByVal WorkDirectory As String)
Dim WshShell As Object = CreateObject("WScript.Shell")
Dim NewShortcut As Object = WshShell.CreateShortcut(ShortcutFolder & "\" & Name & ".lnk")
NewShortcut.TargetPath = File
NewShortcut.WindowStyle = 1
NewShortcut.IconLocation = File & ",0"
NewShortcut.WorkingDirectory = WorkDirectory
NewShortcut.Save()
End Function
|