Share via

How to register out-of-proc winRT components from a windows service installed with INF

Aurélien Tollard 0 Reputation points
2025-11-12T10:29:00.78+00:00

I'm working on a Windows service that hosts an out-of-process WinRT component. The service itself is installed via an INF file (not an MSI or AppX installer) as a Software Components.

The problem is with registering the out-of-proc WinRT component. Normally, registering a WinRT component (via regsvr32, reg.exe, or PackageManager) requires TrustedInstaller privileges to write the necessary registry keys.

However, an INF-based installer runs under the System account context, and I can’t find a reliable or supported way to register the WinRT component during installation so that:

  • The registration is system-wide.
  • The out-of-proc component can be hosted by my service.

So I would like to know what is the supported method for registering an out-of-proc WinRT component when your service is installed via an INF file?

Any guidance or official documentation references would be appreciated.

Windows development | Windows API - Win32
0 comments No comments

1 answer

Sort by: Most helpful
  1. Tom Tran (WICLOUD CORPORATION) 4,860 Reputation points Microsoft External Staff Moderator
    2025-11-13T07:55:33.83+00:00

    Hi @Aurélien Tollard ,

    Thanks for your detailed layout!

    After digging around, I don't think there is a supported way to register an out-of-process WinRT component system-wide using only an INF installer alone now. The required registry keys for WinRT activation are protected by TrustedInstaller, and Microsoft does not provide any INF directive or API for this just like you said.

    The only supported options I managed to find are:


    MSIX/Desktop Bridge packaging:

    Declare the out-of-proc server in the package manifest, and Windows handles registration during deployment.

    Reference:

    Registration-Free WinRT (RegFreeWinRT):

    Works for non-packaged apps without registry writes, but it’s per-process, not system-wide.

    Reference:

    If system-wide activation without MSIX is required, you should consider classic COM, which supports out-of-proc servers and can be registered by INF: Registering COM Servers


    I hope this answer your question! If you have any questions, please comment below. I'll be happy to help!

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.