Create shortcut on Desktop

Imports IWshRuntimeLibrary

 

Dim wshShell As New WshShell

Dim desktop As String = wshShell.SpecialFolders.Item("Desktop").ToString()

 

Dim shortcut As IWshShortcut = CType(wshShell.CreateShortcut(desktop & "\rachit.lnk"), IWshShortcut)

 

shortcut.TargetPath = ""

Dim strProcess As String = System.Windows.Forms.Application.StartupPath() + "\rachit.exe" '"Program Files\Internet Explorer\iexplore.exe"

 

Dim strIconPath As String

strIconPath = Path.GetDirectoryName(Application.ExecutablePath) + "\Shanesh.ico"

 

strIconPath = strIconPath.Replace("bin\Debug", "")

 

 

With shortcut

 

.TargetPath = strProcess

      .WindowStyle = 1

      .Description = "Open Shanesh with kiosk mode"

      .IconLocation = strIconPath

      .Save()

 

End With

Ebook Download
View all
Learn
View all