Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-76269

Problematic per-user fallback for COM registration

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.12.0
    • Fix Version/s: 5.14
    • Component/s: ActiveX Support
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      ActiveQt currently has a very permissive behavior when attempting to register a COM DLL/EXE server in the registry. It first attempts to register in the machine-wide part of the registry, will automatically fallback to the per-user part. The implementation is found in the UpdateRegistry function in src/activeqt/control/qaxserver.cpp.

      This sounds nice in theory, but can easily lead to situations where SW is accidentally installed only for the current user, whereas the intent was a machine-wide installation. User Account Control (UAC) in recent versions of Windows triggers this behavior by default, unless the user explicitly selects "run as administrator". This problem quickly becomes a mess if the per-user registration is not unregistered before doing a machine-wide registration. The computer will then contain a mix of per-user (for only one users) and machine-wide registration (for all users) of the same SW. This might work nicely for a while, but will cause problems if the COM registration is somehow changed in the next SW update.

      To mitigate this problem, I'm proposing to change ActiveQt to only perform machine-wide registration by default. Per-user registration can instead be opted in manually by calling regsvr32 /n /i:user for DLLs and RegServerPerUser/UnregServerPerUser arguments for EXE (same as ATL implements in atlmfc\include\atlbase.h).

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kleint Friedemann Kleint
            Reporter:
            forderud Fredrik Orderud
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews