mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
Cleanup berfore uninstall, post-uninstall refactoring
This commit is contained in:
@@ -84,10 +84,11 @@ Component.prototype.createOperations = function()
|
||||
console.log("Microsoft Visual C++ 2017 Redistributable already installed");
|
||||
}
|
||||
|
||||
let pu_path = installer.value("TargetDir").replace(/\//g, '\\') + "\\"
|
||||
component.addElevatedOperation("Execute",
|
||||
["sc", "create", serviceName(), "binpath=", installer.value("TargetDir").replace(/\//g, '\\') + "\\" + serviceName() + ".exe",
|
||||
["sc", "create", serviceName(), "binpath=", pu_path + serviceName() + ".exe",
|
||||
"start=", "auto", "depend=", "BFE/nsi"],
|
||||
"UNDOEXECUTE", ["post-uninstall.exe"]);
|
||||
"UNDOEXECUTE", "cmd", "/c", pu_path + "post_uninstall.cmd");
|
||||
|
||||
} else if (runningOnMacOS()) {
|
||||
component.addElevatedOperation("Execute", "@TargetDir@/post_install.sh", "UNDOEXECUTE", "@TargetDir@/post_uninstall.sh");
|
||||
|
||||
Reference in New Issue
Block a user