Is there a way to remove Windows registry values when installing (and/or uninstalling) an application using the Qt Installer Framework?
I've tried the following as an installation script within a package:
function Component()
{
}
Component.prototype.createOperations = function()
{
component.createOperations();
if (systemInfo.productType === "windows") {
component.addElevatedOperation("Execute", "cmd.exe", "/C", "reg delete \"HKEY_CURRENT_USER\\Software\\<company name>\\<appName>\"", "/f")
}
}
During installation I get the following error:
Error during installation process (com.<companyName>.<appName>):
Execution failed (Unexpected exit code: 1) "cmd.exe "/C reg delete "HKEY_CURRENT_USER\Software\<company name>\<appName>" /f"
(Note: our company name has a space in it, that's why I'm using quotation marks in the command).
Qt Installer Framework: 4.0
Qt: 5.15.2
Compiler: msvc2019 x64