files
shell-utils/Windows/Create-Shortcut.ps1

9 lines
215 B
PowerShell

# WIP
$SourceFilePath = ""
$ShortcutPath = ".lnk"
$WScriptObj = New-Object -ComObject ("WScript.Shell")
$shortcut = $WscriptObj.CreateShortcut($ShortcutPath)
$shortcut.TargetPath = $SourceFilePath
$shortcut.Save()