Skip to content

Commit ce63a78

Browse files
committed
Add support for creating Start Menu shortcuts in the app ID template
1 parent cbf40db commit ce63a78

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/Winget-AutoUpdate/mods/_AppID-template.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ $AllVersions = $False
5151
# Beginning of Desktop Link Name to Remove - optional wildcard (*) after, without .lnk, multiple: "lnk1*","lnk2"
5252
$Lnk = @("")
5353

54+
# Create Start Menu Shortcuts, without .lnk, multiple: "lnk1","lnk2"
55+
$Shortcuts = @("")
56+
$ShortcutsTargets = @("") # Must match the order of $Shortcuts
57+
5458
# Registry _value_ (DWord/String) to add in existing registry Key (Key created if not existing). Example:
5559
# $AddKey = "HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate"
5660
# $AddValue = "WAU_BypassListForUsers"
@@ -129,6 +133,9 @@ if ($AppUninst) {
129133
if ($Lnk) {
130134
Remove-ModsLnk $Lnk
131135
}
136+
if ($Shortcuts) {
137+
Add-Shortcuts $Shortcuts $ShortcutsTargets
138+
}
132139
if ($AddKey -and $AddValue -and $AddTypeData -and $AddType) {
133140
Add-ModsReg $AddKey $AddValue $AddTypeData $AddType
134141
}

0 commit comments

Comments
 (0)