Dim shortCut As IWshRuntimeLibrary.IWshShortcut
Dim WshShell As WshShellClass = New WshShellClass
Dim allUsersDesktop As String = "AllUsersDesktop"
Dim shortcutPath As String = WshShell.SpecialFolders.Item(allUsersDesktop).ToString
shortCut = CType(WshShell.CreateShortcut(shortcutPath & "\" & shortcutName & ".lnk"), IWshRuntimeLibrary.IWshShortcut)
shortCut.TargetPath = targetFullpath
shortCut.WindowStyle = 1
shortCut.Description = shortcutName
shortCut.WorkingDirectory = workingDir
shortCut.IconLocation = iconFile & ", " & iconNumber
shortCut.Save()
|