Ordres per instal·lar Visual Studio / Code for Command Palette sense preguntes, desinstal·lar-lo i detectar-lo des d’eines de desplegament. Només es mostra una ordre quan és segura: la que indica el manifest o el valor per defecte documentat de la tecnologia de l’instal·lador.
Guia relacionada: Instal·lació silenciosa: MSI, NSIS, Inno Setup · Desinstal·lar un programa amb el registre o PowerShell
Amb winget
PowerShell
winget install --id 15722UsefulApp.WorkspaceLauncherForVSCode -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id 15722UsefulApp.WorkspaceLauncherForVSCode -e --silentwinget uninstall --id 15722UsefulApp.WorkspaceLauncherForVSCode -e --silentPer instal·lador
64 bits · MSIX
Instal·lació silenciosa
Add-AppxPackage -Path 15722UsefulApp.WorkspaceLauncherforVSCode_1.30.0.0_x64__s4b834ss2syh6.MsixDesinstal·lar
Get-AppxPackage -Name 15722UsefulApp.WorkspaceLauncherforVSCode | Remove-AppxPackage- Carpeta d’instal·lació
- %ProgramFiles%/WindowsApps/15722UsefulApp.WorkspaceLauncherforVSCode_1.30.0.0_x64__s4b834ss2syh6
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-visual-studio-code-for-command-palette.ps1
$url = 'https://github.com/tanchekwei/VisualStudioCodeForCommandPalette/releases/download/v1.30.0.0/15722UsefulApp.WorkspaceLauncherforVSCode_1.30.0.0_x64__s4b834ss2syh6.Msix'
$sha256 = '549633F5E05F2CEC5E271D1F6958593DC52EA9C528584ECE17F87D10A39EF2BD'
$file = Join-Path $env:TEMP '15722UsefulApp.WorkspaceLauncherforVSCode_1.30.0.0_x64__s4b834ss2syh6.Msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file