Ordres per instal·lar PingYi 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 Qingshihuan.PingYi -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Qingshihuan.PingYi -e --silentwinget uninstall --id Qingshihuan.PingYi -e --silentPer instal·lador
64 bits · EXE (Inno Setup) · Tots els usuaris
Instal·lació silenciosa
PingYi-0.3.0-win-x64-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-Una altra carpeta
PingYi-0.3.0-win-x64-setup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\Apps\pingyi"- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CB72A4A2-277B-4763-9AC2-DF0B17107579}_is1
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-pingyi.ps1
$url = 'https://github.com/qingshihuan/pingyi/releases/download/v0.3.0/PingYi-0.3.0-win-x64-setup.exe'
$sha256 = '5266DB16C9C502278C58959B7F4C314873BCF10153ED3A6A4AA27D378036289C'
$file = Join-Path $env:TEMP 'PingYi-0.3.0-win-x64-setup.exe'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process -FilePath $file -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -Wait