Skip to content
Snippets Groups Projects
Commit 0236703b authored by jkito's avatar jkito :skull: Committed by jkito
Browse files

installer: use $APPNAME in error messages instead of RiseupVPN

the $APPNAME is a template variable and replace by the gen-qt-installer
script at build time, which allows to have the correct name of the app
on the error message during uninstall
parent ebe02016
No related branches found
No related tags found
1 merge request!226installer: add wizard page to install for all users on windows
Pipeline #230945 passed
......@@ -103,14 +103,14 @@ Component.prototype.createOperations = function ()
function preInstallWindows() {
console.log("Pre-installation for Windows: check for running bitmask");
component.addOperation(
"Execute", "{1}", "powershell", "-NonInteractive", "-NoProfile", "-command", "try {Get-Process $BINNAME} catch { exit 1}",
"errormessage=It seems that an old RiseupVPN client is running. Please exit the app and run this installer again.",
"Execute", "{1}", "powershell", "-NonInteractive", "-NoProfile", "-command", "try {Get-Process $BINNAME -ErrorAction Stop} catch { exit 1}",
"errormessage=It seems that an old $APPNAME client is running. Please exit the app and run this installer again.",
);
/* Remove-Service only introduced in PS 6.0 */
component.addElevatedOperation(
"Execute", "{0}", "powershell", "-NonInteractive", "-NoProfile", "-command",
"try {Get-Service bitmask-helper-v2} catch {exit 0}; try {Stop-Service bitmask-helper-v2} catch {}; try {$$srv = Get-Service bitmask-helper-v2; if ($$srv.Status -eq 'Running') {exit 1} else {exit 0};} catch {exit 0}",
"errormessage=It seems that bitmask-helper-v2 service is running, and we could not stop it. Please manually uninstall any previous RiseupVPN or CalyxVPN client and run this installer again.",
"errormessage=It seems that bitmask-helper-v2 service is running, and we could not stop it. Please manually uninstall any previous $APPNAME client and run this installer again.",
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment