Wie kann man eine Verknüpfung erstellen ?

@Saber:
Ich denke er meint die Verknüpfungen die z.B. auf dem Desktop liegen. Aber wie man sowas erstellt kA ich könnte dir nur sagen wie du eine *.url machst ;)
 
Kann mir das mal einer in C# übersetzen bitte ?


Dim Shell As WshShell
Dim Shortcut As WshShortcut

Private Sub cmdMakeLNKFile_Click()

'initialize the object WshShell
Set objShell = New WshShell

'initialize the object WshShortcut
'the complete name of the .lnk file, include full path plus the .LNK file extension
Set objShortcut = objShell.CreateShortcut (txtLnkName.Text)

'the file to be called by the .lnk file, ej. "c:\windows\calc.exe"
objShortcut.TargetPath = txtTarget.Text

'(optional) := any command line supported by the file indicated in txtTarget.Text
'objShortcut.Arguments = xxxx

'(optional) : = a valid icon file : = To use the same icon of the target file, do not use the next line.
'objShortcut.IconLocation = xxxx

'Save the .lnk
objShortcut.Save

End Sub
 
Der Source steht zwar da, aber ich habe dir den Sourcecode als Anhang hinzugefügt.
 

Anhänge

  • shelllinksource.zip
    9,3 KB · Aufrufe: 751
Zurück