Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Installer Framework - delete registry key in uninstall



  • Dear all,

    I have some problems with the qt installer framework.

    During installation process I creat one or more windows registry keys via installer.

    "installscript.js":
    component.addOperation("GlobalConfig", "Company","Application","License/Key", "00000000-00000000");
    :

    Is there any way to delete that windows registry key during uninstallation?

    Thank you very much in advance



  • Dear all,
    I found a solution

    "installscript.js"
    ...
    Component.prototype.createOperations = function()
    {
    if (installer.value("os") == "win")
    {
    component.addElevatedOperation("Execute","echo do nothing","UNDOEXECUTE","cmd /C reg delete "HKEY_CURRENT_USER\Software\Company" /f")
    ...

    The echo in the line is necessary, otherwise the installer crashes.
    This seems to be a bug in the installer.
    It works quite well, now all registry entries are deleted.

    Thx



  • I need to delete registry key during UNINSTALLATION in "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\XYZ". I have tried your method without any success. Please suggest any other way to delete key.


Log in to reply