Untitled
unknown
plain_text
5 months ago
1.2 kB
2
Indexable
# Step 1: Silently install Digidoc from Microsoft Store winget install 9pfpfk4dj1s6 --silent --accept-package-agreements --accept-source-agreements # Step 2: Get the AppUserModelID for the Digidoc App # This command retrieves the AppUserModelID from installed apps on your system $AppPackage = Get-StartApps | Where-Object { $_.Name -like "*Digidoc*" } if ($AppPackage -eq $null) { Write-Host "Could not find Digidoc app. Please make sure it's installed." exit } $AppUserModelID = $AppPackage.AppID # Step 3: Define the path for the shortcut on the desktop $ShortcutPath = [System.IO.Path]::Combine([System.Environment]::GetFolderPath('Desktop'), 'Digidoc.lnk') # Step 4: Create a shortcut that points to the Microsoft Store app $WScriptShell = New-Object -ComObject WScript.Shell $Shortcut = $WScriptShell.CreateShortcut($ShortcutPath) $Shortcut.TargetPath = "explorer.exe" $Shortcut.Arguments = "shell:AppsFolder\$AppUserModelID" $Shortcut.IconLocation = "C:\Windows\System32\imageres.dll, 45" # Optional: Choose an appropriate icon $Shortcut.Save() Write-Host "Digidoc installed silently and shortcut created on the desktop."
Editor is loading...
Leave a Comment