diff --git a/automatic/tixati/tools/chocolateyInstall.ps1 b/automatic/tixati/tools/chocolateyInstall.ps1 index cc896ff8584..f78aee9193b 100644 --- a/automatic/tixati/tools/chocolateyInstall.ps1 +++ b/automatic/tixati/tools/chocolateyInstall.ps1 @@ -1,5 +1,9 @@ $ErrorActionPreference = 'Stop' +if (Get-Process "Tixati*" -ErrorAction SilentlyContinue) { + Throw "Tixati is running! To prevent data loss, please fully quit Tixati before attempting to upgrade it." +} + $toolsDir = Split-Path -parent $MyInvocation.MyCommand.Definition $fileName = 'tixati-3.25-1.install.exe' $dlDir = "$Env:TEMP\chocolatey\$($Env:ChocolateyPackageName)\$($Env:ChocolateyPackageVersion)" diff --git a/automatic/tixati/tools/chocolateyUninstall.ps1 b/automatic/tixati/tools/chocolateyUninstall.ps1 index 77a22ed70c2..acf0eb76514 100644 --- a/automatic/tixati/tools/chocolateyUninstall.ps1 +++ b/automatic/tixati/tools/chocolateyUninstall.ps1 @@ -1,5 +1,9 @@ $ErrorActionPreference = 'Stop' +if (Get-Process "Tixati*" -ErrorAction SilentlyContinue) { + Throw "Tixati is running! To prevent data loss, please fully quit Tixati before attempting to uninstall it." +} + $packageName = 'tixati' $installLocation = Get-AppInstallLocation $packageName $uninstaller = "$installLocation\uninstall.exe"