Ordres per instal·lar Slack 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 SlackTechnologies.Slack -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id SlackTechnologies.Slack -e --silentwinget uninstall --id SlackTechnologies.Slack -e --silentPer instal·lador
64 bits · EXE · Usuari actual
Instal·lació silenciosa
SlackSetup.exe --silent- Clau de desinstal·lació al registre
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\slack
64 bits · MSIX
Instal·lació silenciosa
Add-AppxPackage -Path Slack.msixDesinstal·lar
Get-AppxPackage -Name com.tinyspeck.slackdesktop | Remove-AppxPackageARM64 · MSIX
Instal·lació silenciosa
Add-AppxPackage -Path Slack.msixDesinstal·lar
Get-AppxPackage -Name com.tinyspeck.slackdesktop | Remove-AppxPackagePowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-slack.ps1
$url = 'https://downloads.slack-edge.com/desktop-releases/windows/x64/4.53.276/SlackSetup.exe'
$sha256 = 'B210EC8150B8A94AC8349D13A75747CEAFAF58A71CA27D30B48E56CC95B92078'
$file = Join-Path $env:TEMP 'SlackSetup.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 '--silent' -Wait install-slack.ps1
$url = 'https://downloads.slack-edge.com/desktop-releases/windows/x64/4.53.276/Slack.msix'
$sha256 = '20A2F8C8A5E47D8FB91C0DF38BC9B7E6EC9772FFEB0A5E3454740BE6057D8A6D'
$file = Join-Path $env:TEMP 'Slack.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file install-slack.ps1
$url = 'https://downloads.slack-edge.com/desktop-releases/windows/arm64/4.53.276/Slack.msix'
$sha256 = '1CA79E419E1438335F06045B43A70BDA2367CE13C8076FDF6B1C5C8D110E6BE7'
$file = Join-Path $env:TEMP 'Slack.msix'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file