''' <Summary>
''' Create a desktop shortcut
''' </Summary>
''' <Remarks> </remarks>
Private sub createmediatopshortcut ()
Dim appname = My. application. info. companyName & my. application. info. productname
Dim export toppath = environment. getfolderpath (environment. specialfolder. desktop)
Dim filedesktop as fileinfo = new fileinfo (export toppath + "\" & appname & ". lnk ")
If not filedesktop. exists then
Dim shell = new wshshell ()
Dim shortcut = ctype (shell. createshortcut (environment. getfolderpath (environment. specialfolder. shorttopdirectory) + "\" & appname & ". lnk"), iwshshortcut)
Export cut. workingdirectory = system. environment. currentdirectory
Export cut. windowstyle = 1
Export cut. Description = appname
Export cut. iconlocation = application. executablepath
Export cut. targetpath = application. startuppath + "\" + my. application. info. assemblyname & ". EXE"
Shortcut cut. Save ()
End if
End sub
Create Boot Mode
Private sub createstartup ()
Dim appname = My. application. info. companyName & my. application. info. productname
Dim startuppath = environment. getfolderpath (environment. specialfolder. startup)
Dim filestartup as fileinfo = new fileinfo (startuppath + "\" & appname & ". lnk ")
If not filestartup. exists then
Dim shell = new wshshell ()
Dim shortcut = ctype (shell. createshortcut (environment. getfolderpath (environment. specialfolder. startup) + "\" & appname & ". lnk"), iwshshortcut)
Export cut. workingdirectory = system. environment. currentdirectory
Export cut. windowstyle = 1
Export cut. Description = appname
Export cut. iconlocation = application. executablepath
Export cut. targetpath = application. startuppath + "\" + my. application. info. assemblyname & ". EXE"
Shortcut cut. Save ()
End if
End sub