wingetautoupdate/Winget-AutoUpdate/functions/Add-Shortcut.ps1

11 lines
391 B
PowerShell
Raw Normal View History

2023-03-31 15:56:07 +00:00
#Function to create shortcuts
function Add-Shortcut ($Target, $Shortcut, $Arguments, $Icon, $Description) {
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($Shortcut)
$Shortcut.TargetPath = $Target
$Shortcut.Arguments = $Arguments
$Shortcut.IconLocation = $Icon
$Shortcut.Description = $Description
$Shortcut.Save()
}