Description
Looking into the feasibility of making some of the ActivationRegistrationManager
register methods work for machine wide installs / installers (such as RegisterForProtocolActivation
and RegisterForStartupActivation
), possibly by passing an optional parameter (CurrentUser / LocalMachine). Obviously MachineWide would require privileged access to write to HKEY_LOCAL_MACHINE
RegisterForStartupActivation
seems fairly simple, a single registry entry in XX\Software\Microsoft\Windows\CurrentVersion\Run
.
RegisterForProtocolActivation
looks like it's a bit more involved with Assoc registry entries, but I assume these could also be written in HKEY_LOCAL_MACHINE
vs HKEY_CURRENT_USER
?
Context
Looking at installing a WinUI Unpackaged app machine wide. Would love to call the WinAppSDK APIs during the install / uninstall process vs trying to do this in the current user process (registering is easy, unregistering on uninstall gets tricky).
Alternatively I could simulate what WinAppSDK does (I assume these APIs are pretty stable) and write the code myself in the installer.