Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator installer/app poisons the Win11 registry

QtCreator installer/app poisons the Win11 registry

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 4 Posters 121 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Gerd Brecht

    40522428-cbd7-4446-b1f2-62dbde8898d4-grafik.png

    cristian-adamC Online
    cristian-adamC Online
    cristian-adam
    wrote last edited by
    #2

    @Gerd-Brecht It does look bad.

    I have the same setup:

    qtcreator-multiple-entries.png

    I've opened up https://qt-project.atlassian.net/browse/QTCREATORBUG-34177

    cristian-adamC 1 Reply Last reply
    1
    • cristian-adamC cristian-adam

      @Gerd-Brecht It does look bad.

      I have the same setup:

      qtcreator-multiple-entries.png

      I've opened up https://qt-project.atlassian.net/browse/QTCREATORBUG-34177

      cristian-adamC Online
      cristian-adamC Online
      cristian-adam
      wrote last edited by
      #3

      @cristian-adam said in QtCreator installer/app poisons the Win11 registry:

      @Gerd-Brecht It does look bad.

      I have the same setup:

      qtcreator-multiple-entries.png

      I've opened up https://qt-project.atlassian.net/browse/QTCREATORBUG-34177

      I fixed my dialog by installing the standalone version of Qt Creator.

      Then everything was better:
      qtcreator-cpp-file-after-installation.png

      1 Reply Last reply
      0
      • cristian-adamC Online
        cristian-adamC Online
        cristian-adam
        wrote last edited by
        #4

        As documented in the bug report above, the Qt Installer Framework only documents Register File Extension Example but there is no uninstallation.

        In this regard the Qt SDK and Qt Creator installers also do not take care of removing the added registry keys.

        I put together a .bat script that removes all Qt Creator added file associations:

        @echo off
        
        goto :main
        
        :DeleteExtensionKeys
            reg delete "HKCU\Software\Classes\Applications\QtProject.QtCreator%~1" /f > nul 2>&1
            reg delete "HKCU\Software\Classes\QtProject.QtCreator%~1" /f > nul 2>&1
            reg delete "HKCU\Software\Classes\%~1\OpenWithProgIds" /v "QtProject.QtCreator%~1" /f > nul 2>&1
            exit /b
        
        :main
        
        call :DeleteExtensionKeys .c
        call :DeleteExtensionKeys .c++
        call :DeleteExtensionKeys .cc
        call :DeleteExtensionKeys .cpp
        call :DeleteExtensionKeys .cxx
        call :DeleteExtensionKeys .h
        call :DeleteExtensionKeys .h++
        call :DeleteExtensionKeys .hh
        call :DeleteExtensionKeys .hpp
        call :DeleteExtensionKeys .hxx
        call :DeleteExtensionKeys .pri
        call :DeleteExtensionKeys .pro
        call :DeleteExtensionKeys .qbs
        call :DeleteExtensionKeys .qml
        call :DeleteExtensionKeys .qs
        call :DeleteExtensionKeys .ui
        
        echo.
        echo All Qt Creator file-association keys have been deleted.
        echo.
        
        pause
        
        Z 1 Reply Last reply
        2
        • cristian-adamC cristian-adam

          As documented in the bug report above, the Qt Installer Framework only documents Register File Extension Example but there is no uninstallation.

          In this regard the Qt SDK and Qt Creator installers also do not take care of removing the added registry keys.

          I put together a .bat script that removes all Qt Creator added file associations:

          @echo off
          
          goto :main
          
          :DeleteExtensionKeys
              reg delete "HKCU\Software\Classes\Applications\QtProject.QtCreator%~1" /f > nul 2>&1
              reg delete "HKCU\Software\Classes\QtProject.QtCreator%~1" /f > nul 2>&1
              reg delete "HKCU\Software\Classes\%~1\OpenWithProgIds" /v "QtProject.QtCreator%~1" /f > nul 2>&1
              exit /b
          
          :main
          
          call :DeleteExtensionKeys .c
          call :DeleteExtensionKeys .c++
          call :DeleteExtensionKeys .cc
          call :DeleteExtensionKeys .cpp
          call :DeleteExtensionKeys .cxx
          call :DeleteExtensionKeys .h
          call :DeleteExtensionKeys .h++
          call :DeleteExtensionKeys .hh
          call :DeleteExtensionKeys .hpp
          call :DeleteExtensionKeys .hxx
          call :DeleteExtensionKeys .pri
          call :DeleteExtensionKeys .pro
          call :DeleteExtensionKeys .qbs
          call :DeleteExtensionKeys .qml
          call :DeleteExtensionKeys .qs
          call :DeleteExtensionKeys .ui
          
          echo.
          echo All Qt Creator file-association keys have been deleted.
          echo.
          
          pause
          
          Z Offline
          Z Offline
          ziller
          wrote last edited by ziller
          #5

          @cristian-adam said in QtCreator installer/app poisons the Win11 registry:

          As documented in the bug report above, the Qt Installer Framework only documents Register File Extension Example but there is no uninstallation.

          In this regard the Qt SDK and Qt Creator installers also do not take care of removing the added registry keys.

          That is the wrong conclusion, all installer operations implicitly define undo operations that are run automatically whenever the component is uninstalled (be it because the installer/uninstaller is used to remove the component, or because the component is updated, which is equivalent to uninstall+install). https://code.qt.io/cgit/installer-framework/installer-framework.git/tree/src/libs/installer/registerfiletypeoperation.cpp#n129

          1 Reply Last reply
          0
          • JonBJ Offline
            JonBJ Offline
            JonB
            wrote last edited by
            #6

            @cristian-adam
            Do you prefer suggestions/conversations here or in the Jira? I don't want to pollute your Jira so maybe here is preferable?

            At this point what about a different tack? Does same happen with, say, Creator 17, or is this new at 18? If there is an older version where this does not happen, how much has changed in Installer code to examine?

            cristian-adamC 1 Reply Last reply
            0
            • JonBJ JonB

              @cristian-adam
              Do you prefer suggestions/conversations here or in the Jira? I don't want to pollute your Jira so maybe here is preferable?

              At this point what about a different tack? Does same happen with, say, Creator 17, or is this new at 18? If there is an older version where this does not happen, how much has changed in Installer code to examine?

              cristian-adamC Online
              cristian-adamC Online
              cristian-adam
              wrote last edited by
              #7

              @JonB I like JIRA due to the fact that management is using that for tracking progress. I don't think the closed forum entries is tracked as closed bugs.

              It happens with Qt Creator 17 too. It's a bug in the Qt Installer Framework, since as @ziller mentioned the installer should apply the undo operations for the do operations 😅

              qtcreator-17-uninstall-woes.png

              JonBJ 1 Reply Last reply
              0
              • cristian-adamC cristian-adam

                @JonB I like JIRA due to the fact that management is using that for tracking progress. I don't think the closed forum entries is tracked as closed bugs.

                It happens with Qt Creator 17 too. It's a bug in the Qt Installer Framework, since as @ziller mentioned the installer should apply the undo operations for the do operations 😅

                qtcreator-17-uninstall-woes.png

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote last edited by JonB
                #8

                @cristian-adam said in QtCreator installer/app poisons the Win11 registry:

                It happens with Qt Creator 17 too. It's a bug in the Qt Installer Framework, since as @ziller mentioned the installer should apply the undo operations for the do operations

                Just a quick reply here, then maybe I'll revert to Jira. Yes, Windows installers put in uninstall commands into registry. So are you saying those are somehow not being executed from the re-install? You might track them down and execute them explicitly, IIRC, to check they do what they should.

                cristian-adamC 1 Reply Last reply
                0
                • JonBJ JonB

                  @cristian-adam said in QtCreator installer/app poisons the Win11 registry:

                  It happens with Qt Creator 17 too. It's a bug in the Qt Installer Framework, since as @ziller mentioned the installer should apply the undo operations for the do operations

                  Just a quick reply here, then maybe I'll revert to Jira. Yes, Windows installers put in uninstall commands into registry. So are you saying those are somehow not being executed from the re-install? You might track them down and execute them explicitly, IIRC, to check they do what they should.

                  cristian-adamC Online
                  cristian-adamC Online
                  cristian-adam
                  wrote last edited by
                  #9

                  @JonB said in QtCreator installer/app poisons the Win11 registry:

                  @cristian-adam said in QtCreator installer/app poisons the Win11 registry:

                  It happens with Qt Creator 17 too. It's a bug in the Qt Installer Framework, since as @ziller mentioned the installer should apply the undo operations for the do operations

                  Just a quick reply here, then maybe I'll revert to Jira. Yes, Windows installers put in uninstall commands into registry. So are you saying those are somehow not being executed from the re-install? You might track them down and execute them explicitly, IIRC, to check they do what they should.

                  A re-install is fine, you will get updated values. The uninstall is the issue, it doesn't remove all the added registry keys.

                  And for somebody trying out Qt Creator, then uninstalling it ... then the keys remain, the user tries to open a .cpp file in Windows Explorer and being confronted with this nice dialog.

                  JonBJ 1 Reply Last reply
                  0
                  • cristian-adamC cristian-adam

                    @JonB said in QtCreator installer/app poisons the Win11 registry:

                    @cristian-adam said in QtCreator installer/app poisons the Win11 registry:

                    It happens with Qt Creator 17 too. It's a bug in the Qt Installer Framework, since as @ziller mentioned the installer should apply the undo operations for the do operations

                    Just a quick reply here, then maybe I'll revert to Jira. Yes, Windows installers put in uninstall commands into registry. So are you saying those are somehow not being executed from the re-install? You might track them down and execute them explicitly, IIRC, to check they do what they should.

                    A re-install is fine, you will get updated values. The uninstall is the issue, it doesn't remove all the added registry keys.

                    And for somebody trying out Qt Creator, then uninstalling it ... then the keys remain, the user tries to open a .cpp file in Windows Explorer and being confronted with this nice dialog.

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote last edited by JonB
                    #10

                    @cristian-adam
                    Is it the case then: the uninstall either does nothing or does not work, the reinstall does not really uninstall/remove but just happens to overwrite retained values with something else so it ends up working OK?

                    I know I can't be that much use as I don't do Qt under Windows. But would you like me to go find where the Uninstall script is stored in registry so you can try it out standalone, or do you already know this?

                    cristian-adamC 1 Reply Last reply
                    0
                    • JonBJ JonB

                      @cristian-adam
                      Is it the case then: the uninstall either does nothing or does not work, the reinstall does not really uninstall/remove but just happens to overwrite retained values with something else so it ends up working OK?

                      I know I can't be that much use as I don't do Qt under Windows. But would you like me to go find where the Uninstall script is stored in registry so you can try it out standalone, or do you already know this?

                      cristian-adamC Online
                      cristian-adamC Online
                      cristian-adam
                      wrote last edited by
                      #11

                      @JonB said in QtCreator installer/app poisons the Win11 registry:

                      @cristian-adam
                      Is it the case then: the uninstall either does nothing or does not work, the reinstall does not really uninstall/remove but just happens to overwrite retained values with something else so it ends up working OK?

                      I know I can't be that much use as I don't do Qt under Windows. But would you like me to go find where the Uninstall script is stored in registry so you can try it out standalone, or do you already know this?

                      See above at the manual removal script.

                      I think the Qt Installer should be able to reproduce and fix the QTIFW-3944 issue. I see @ziller is still assigned, hmm.

                      1 Reply Last reply
                      1

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved