Ordres per instal·lar P4 Apps 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 Perforce.P4V -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Perforce.P4V -e --silentwinget uninstall --id Perforce.P4V -e --silentPer instal·lador
64 bits · EXE (WiX Burn) · Tots els usuaris
Instal·lació silenciosa
p4vinst64.exe /quiet /norestartDesinstal·lar
msiexec /x {E4720099-B569-44B5-8BD6-BD6F4D66033E} /qn /norestart- Codi de producte MSI
- {e4720099-b569-44b5-8bd6-bd6f4d66033e}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{e4720099-b569-44b5-8bd6-bd6f4d66033e}
- UpgradeCode
- {AE554B2A-CA7C-4DA4-8A4E-BC6085DFACE4}
64 bits · MSI · Tots els usuaris
Instal·lació silenciosa
msiexec /i p4vinst64.msi /qn /norestartDesar un registre
msiexec /i p4vinst64.msi /qn /norestart /l*v "%TEMP%\p4-apps-install.log"Desinstal·lar
msiexec /x {858CC3A4-611E-4887-871D-1C2DDDE12273} /qn /norestart- Codi de producte MSI
- {858CC3A4-611E-4887-871D-1C2DDDE12273}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{858CC3A4-611E-4887-871D-1C2DDDE12273}
- UpgradeCode
- {70A9FDC7-885B-4D6D-BAFD-CB2D27AB2963}
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-p4-apps.ps1
$url = 'https://filehost.perforce.com/perforce/r26.3/bin.ntx64/p4vinst64.exe'
$sha256 = '7EC701333A20BD91F1F94C8C22A46E6960126620099655A3C285C0B67588312B'
$file = Join-Path $env:TEMP 'p4vinst64.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 '/quiet /norestart' -Wait install-p4-apps.ps1
$url = 'https://filehost.perforce.com/perforce/r26.3/bin.ntx64/p4vinst64.msi'
$sha256 = '282D57DD9DD0A07F76F128D89298F79B8118F2058BCA73AF3EB94653902F3A39'
$file = Join-Path $env:TEMP 'p4vinst64.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait