mattermost-desktop/scripts/installer.nsh
aaron 057377207a
Some checks failed
release / begin-notification (push) Has been cancelled
release / build-linux (push) Has been cancelled
release / build-msi-installer (push) Has been cancelled
release / build-mac-installer (push) Has been cancelled
release / upload-to-s3 (push) Has been cancelled
release / github-release (push) Has been cancelled
release / end-notification (push) Has been cancelled
first commit bois
2024-10-03 06:35:14 -07:00

9 lines
603 B
Plaintext

# This macro fetches the currently installed MM version via MSI (if any) and uninstalls it first
!macro customInit
nsExec::ExecToStack "$\"$%SYSTEMROOT%\system32\WindowsPowerShell\v1.0\powershell.exe$\" -command $\"$$Installer = New-Object -ComObject WindowsInstaller.Installer; $$MMProduct = $$Installer.ProductsEx('', '', 7) | Where-Object -FilterScript {$$_.InstallProperty('ProductName') -eq 'Mattermost'}; if ($$MMProduct -ne $$null) {Write-Host -NoNewline $$MMProduct.ProductCode()}$\""
Pop $0
Pop $1
StrCmp $1 "" 0 +1
ExecWait '"$%SYSTEMROOT%\system32\msiexec.exe" /x $1 /qn'
!macroend