Imports IWshRuntimeLibrary
Imports System.Environment
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim shell As WshShell = New WshShellClass
Dim Desktop As String = Environment.GetFolderPath(SpecialFolder.DesktopDirectory)
Dim shortcut As WshShortcut = shell.CreateShortcut(Desktop & "/MyApp.lnk")
shortcut.TargetPath = "C:\MyApp.exe"
shortcut.Description = "Description (optional)"
shortcut.Save()
End Sub
End Class