Overwrite the agent if it's already installed.

This commit is contained in:
Sander Declerck 2026-01-19 13:48:33 +01:00
parent 2a649c5ef8
commit 7f6ce79f44
No known key found for this signature in database

View file

@ -41,7 +41,7 @@ async function installOnWindows() {
stopServiceIfRunning();
ui.writeInformation("Installing SafeChain Agent...");
ui.writeVerbose(`Running: msiexec /i "${msiPath}" /qn`);
ui.writeVerbose(`Running: msiexec /i "${msiPath}" /qn REINSTALL=ALL REINSTALLMODE=vomus`);
runMsiInstaller(msiPath);
ui.writeInformation("Starting SafeChain Agent service...");
@ -91,7 +91,10 @@ async function downloadFile(url, destPath) {
* @param {string} msiPath
*/
function runMsiInstaller(msiPath) {
execSync(`msiexec /i "${msiPath}" /qn`, { stdio: "inherit" });
// Use /i for install/upgrade with REINSTALL=ALL REINSTALLMODE=vomus
// This forces a reinstall of all features if the product is already installed
// /qn = quiet mode (no UI)
execSync(`msiexec /i "${msiPath}" /qn REINSTALL=ALL REINSTALLMODE=vomus`, { stdio: "inherit" });
}
function stopServiceIfRunning() {