Shortcut mit Systemicons erstellen
Verfasst: Di Sep 14, 2021 10:01 am
Kann man Shortcuts mit Systemicons erstellen z.B.: aus %SystemRoot%\system32\SHELL32.dll?
Support Forum der Aagon GmbH fuer ACMP und ACK
https://acc.aagon.com/
Code: Alles auswählen
$LnkFile=$env:USERPROFILE+"\Desktop\link.lnk" #Pfadname der LNK-Datei
$WshShell = New-Object -comObject WScript.Shell
$shortcut= $WshShell.CreateShortcut($LnkFile)
$shortcut.IconLocation="c:\windows\system32\shell32.dll,6" #Icon (ggf. inkl. Index)
$shortcut.TargetPath="C:\temp\prog.exe" #Ziel
$shortcut.Arguments="args" #Befehlszeilenargumente
$shortcut.Description="description" #Kommentar
$shortcut.Hotkey="ALT+CTRL+W" #Hotkey
$shortcut.WorkingDirectory="C:\temp\" #Ausführen in
$shortcut.WindowStyle=7 #1-Normal, 7(!)-Minimiert, 3- Maximiert
$shortcut.Save()