Desktopverknüpfung erstellen

hallo,
wie krieg ichs hin ???

  • mittels VB6 oder Setup.exe(Verpackungs und weitergabeassis. Visual studio, oder ggf. Winzip self extr. -

* mal angenommen man baue sich einen Terminkalender.exe … der soll dann auf dem Desktop verknüpft werden …

Danke und liebe Grüße
Udo

hab was gefunden, danke
Option Explicit
Private Sub Command1_Click()
Dim sZiel As String
Dim sPfad As String
Dim sText As String
Dim fPrivat As Boolean
If Option1(0).Value = True Then
sZiel = „…\Desktop“
ElseIf Option1(1).Value = True Then
sZiel = „.\Autostart“
Else
sZiel = „.“
End If

sText = Text1.Text
sPfad = App.Path & „\Projekt1.exe“
fPrivat = True
'-------------------------------------------------------------
If VerknuepfungAnlegenVB6(sZiel, sPfad, sText, _
fPrivat) = True Then
MsgBox „Verknüpfung wurde erstellt.“, 64, Me.Caption
Else
MsgBox „Verknüpfung konnte nicht erstellt werden.“, _
16, „Fehler“
End If
End Sub
Private Sub Command2_Click()
Unload Me
End
End Sub

Modul:
Option Explicit
Declare Function CreateShellLink Lib „vb6stkit.dll“ Alias _
„fCreateShellLink“ (ByVal lpstrFolderName As String, _
ByVal lpstrLinkName As String, _
ByVal lpstrLinkPath As String, _
ByVal lpstrLinkArguments As String, _
ByVal fPrivate As Long, _
ByVal sParent As String) As Long
Function VerknuepfungAnlegenVB6(Ziel As String, Pfadname _
As String, Text As String, Privat As Boolean) As Boolean
Dim sParent As String
sParent = „$(Programs)“
VerknuepfungAnlegenVB6 = _
CreateShellLink(Ziel, Text, Pfadname, „“, Privat, sParent)
End Function

[Bei dieser Antwort wurde das Vollzitat nachträglich automatisiert entfernt]