Ho appena creato il pacchetto d'installazione di un programmino che ho sviluppato, vorrei però che in automatico finita l'installazione mi creasse un icona sul deshtop per avviare il programma, come posso fare ?
Ho appena creato il pacchetto d'installazione di un programmino che ho sviluppato, vorrei però che in automatico finita l'installazione mi creasse un icona sul deshtop per avviare il programma, come posso fare ?
non riesco neppure io a creare l'icona sul desktop. Utilizzo VB6 e il software per la creazione di pacchetti di default fornito con VB6.
Help me...
grazie ciao.
ok pazienza... la creerà l'utilizzatore finale del software
provate con questo:
chiamata di esempio: Call CreaCollegamentoDesktop("MIO PROGRAMMA", PercorsoEseguibile, , PercorsoIcona, PercorsoDirLavoro)
Public Sub CreaCollegamentoDesktop(ByVal sName As String, ByVal sPath As String, Optional HotKey As String = "", Optional sIcon As String = "", Optional sWorkingDirectory As String = "", Optional sSubFolder As String = "", Optional iWinStyle As Integer = vbNormalFocus)
Dim WshShell As Object
Dim oShellLink As Object
Dim sLinkPath As String
Set WshShell = CreateObject("WScript.Shell")
sLinkPath = WshShell.SpecialFolders("Desktop")
On Error Resume Next
If sSubFolder <> "" Then
sLinkPath = sLinkPath & "\" & sSubFolder
If Dir(sLinkPath) = "" Then MkDir sLinkPath
End If
On Error GoTo 0
Set oShellLink = WshShell.CreateShortCut(sLinkPath & "\" & sName & ".lnk")
oShellLink.WindowStyle = iWinStyle
oShellLink.HotKey = sHotKey
oShellLink.TargetPath = sPath
oShellLink.IconLocation = sIcon
oShellLink.Description = sName
oShellLink.WorkingDirectory = sWorkingDirectory
oShellLink.Save
Set oShellLink = Nothing
Set WshShell = Nothing
End Sub
:mavieni: