mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Overwrite the agent if it's already installed.
This commit is contained in:
parent
2c0245b020
commit
6a3c7b938b
1 changed files with 5 additions and 2 deletions
|
|
@ -41,7 +41,7 @@ async function installOnWindows() {
|
||||||
stopServiceIfRunning();
|
stopServiceIfRunning();
|
||||||
|
|
||||||
ui.writeInformation("Installing SafeChain Agent...");
|
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);
|
runMsiInstaller(msiPath);
|
||||||
|
|
||||||
ui.writeInformation("Starting SafeChain Agent service...");
|
ui.writeInformation("Starting SafeChain Agent service...");
|
||||||
|
|
@ -91,7 +91,10 @@ async function downloadFile(url, destPath) {
|
||||||
* @param {string} msiPath
|
* @param {string} msiPath
|
||||||
*/
|
*/
|
||||||
function runMsiInstaller(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() {
|
function stopServiceIfRunning() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue