akvirtualcamera/ports/deploy/installscript.windows.qs

45 lines
1.3 KiB
Text
Raw Normal View History

2020-06-05 22:09:17 +00:00
function Component()
{
}
Component.prototype.beginInstallation = function()
{
component.beginInstallation();
}
Component.prototype.createOperations = function()
{
component.createOperations();
2020-06-17 22:52:39 +00:00
let archs = ["x86", "x64"];
2020-06-05 22:09:17 +00:00
2020-06-17 22:52:39 +00:00
for (let i in archs) {
// Remove virtual cameras
if (installer.isUninstaller()) {
let managerPath =
installer.value("TargetDir")
+ "/"
+ archs[i]
+ "/AkVCamManager.exe";
component.addElevateOperation("Execute",
managerPath,
"remove-devices");
component.addElevatedOperation("Execute",
managerPath,
"update");
}
2020-06-17 22:52:39 +00:00
let assistantPath =
installer.value("TargetDir")
+ "/"
+ archs[i]
+ "/AkVCamAssistant.exe";
2020-06-05 22:09:17 +00:00
2020-06-17 22:52:39 +00:00
// Load assistant daemon.
if (installer.fileExists(assistantPath))
component.addElevatedOperation("Execute",
assistantPath, "--install",
"UNDOEXECUTE",
assistantPath, "--uninstall");
2020-06-17 22:52:39 +00:00
}
2020-06-05 22:09:17 +00:00
}