Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Imports IWshRuntimeLibrary
Private Function CreateShortCut(ByVal shortcutName As String, ByVal creationDir As String, ByVal targetFullpath As String, ByVal workingDir As String, ByVal iconFile As String, ByVal iconNumber As Integer) As Boolean
Try
If Not IO.Directory.Exists(creationDir) Then
Dim retVal As DialogResult = MsgBox(creationdir & " does not exist. Do you wish to create it?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo)
If retVal = DialogResult.Yes
IO.Directory.CreateDirectory(creationDir)
Else
Return False
End If
End If
Dim shortCut As IWshRuntimeLibrary.IWshShortcut
shortCut = CType(wShell.CreateShortcut(creationDir & "\" & shortcutName & ".lnk"), IWshRuntimeLibrary.IWshShortcut)
shortCut.TargetPath = targetFullpath
shortCut.WindowStyle = 1
shortCut.Description = shortcutName
shortCut.WorkingDirectory = workingDir
shortCut.IconLocation = iconFile & ", " & iconNumber
shortCut.Save()
Return True
Catch ex As System.Exception
Return False
End Try
End Function
myBool = CreateShortCut("My Application", System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop), Application.ExecutablePath, Application.StartupPath, "myAppExtensions.dll", 4)