[RESOLVED] Create shorcut to exe
How to create a shortcut of application (C:\MyApp.exe) to desktop with icon?
EDIT: I've find the solution...
Quote:
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
Re: Create shorcut to exe
Even though you have a solution you might want to check out the library I did for this.
http://www.vbforums.com/showpost.php...24&postcount=5
Re: Create shorcut to exe
Thank you very much for the library