$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $url = 'https://web.whatsapp.com/desktop/windows/release/x64/WhatsAppSetup.exe'
Would you like a working example of a chocolateyinstall.ps1 that also handles per‑user vs system detection? chocolatey whatsapp package
$packageArgs = @ packageName = $packageName fileType = $installerType url = $url silentArgs = $silentArgs validExitCodes= $validExitCodes softwareName = 'WhatsApp*' checksum = 'A1B2C3...' # SHA256 of installer checksumType = 'sha256' $toolsDir = "$(Split-Path -parent $MyInvocation
Install-ChocolateyPackage @packageArgs $softwareName = 'WhatsApp*' $installerType = 'exe' $silentArgs = '/S' $uninstallKey = Get-UninstallRegistryKey -SoftwareName $softwareName if ($uninstallKey.UninstallString) Select-Object -Skip 1) -join ' ' Start-Process -FilePath $file -ArgumentList "$args $silentArgs" -Wait -NoNewWindow repeatable Windows setups |
| Aspect | Details | |--------|---------| | Package name | whatsapp | | Source | Official WhatsApp CDN | | Silent switch | /S | | Install type | NSIS / Squirrel | | Auto-updates | Built‑in (can conflict with Chocolatey) | | Package versioning | Manual or automated with CI (e.g., GitHub Actions) | | Best for | System provisioning, repeatable Windows setups |