mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Fix uninstall
This commit is contained in:
parent
4a7629a174
commit
20fb949a23
1 changed files with 4 additions and 4 deletions
|
|
@ -79,14 +79,14 @@ function getWindowsArchitecture() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function uninstallIfInstalled() {
|
async function uninstallIfInstalled() {
|
||||||
const powershellScript = `$app = Get-WmiObject -Class Win32_Product -Filter "Name='SafeChain Agent'"; if ($app) { Write-Output $app.IdentifyingNumber }`;
|
|
||||||
ui.writeVerbose(`Finding product code with PowerShell`);
|
ui.writeVerbose(`Finding product code with PowerShell`);
|
||||||
|
|
||||||
let productCode;
|
let productCode;
|
||||||
try {
|
try {
|
||||||
productCode = execSync(`powershell -Command "${powershellScript}"`, {
|
productCode = execSync(
|
||||||
encoding: "utf8",
|
`powershell -Command "$app = Get-WmiObject -Class Win32_Product -Filter \\"Name='SafeChain Agent'\\"; if ($app) { Write-Output $app.IdentifyingNumber }"`,
|
||||||
}).trim();
|
{ encoding: "utf8" },
|
||||||
|
).trim();
|
||||||
} catch {
|
} catch {
|
||||||
ui.writeVerbose("No existing installation found (fresh install).");
|
ui.writeVerbose("No existing installation found (fresh install).");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue