How do I mix perUser and perMachine installs properly #8057
Replies: 2 comments 5 replies
-
MSI redirects HKCR based on install scope: msidbRegistryRootClassesRoot | 0x000 | 0 | HKEY_CLASSES_ROOT The installer writes or removes the value from the HKCU\Software\Classes hive during installation in the per-user installation context. The installer writes or removes the value from the HKLM\Software\Classes hive during per-machine installations. So make the MSI per-user. |
Beta Was this translation helpful? Give feedback.
-
Strictly speaking HKCR doesn't exist. It's a view of HKLM\SOFTWARE\Classes and HKCU\SOFTWARE\Classes and when installing per-user you are actually writing to HKCU\SOFTWARE\Classes which does not require admin. Also strictly speaking. .NET ComVisible and COM are two different things. This difference is less important but I wanted to make sure you were aware. Is ProgramFiles redirection still a thing in Windows? I seem to recall that at least back in the Vista days that a non-priv attempt to install there would get virtualized in the user profile. Not that I like that. I'd probably author the installer to go to AppData\Local. Your scenario sounds pretty easy and straight forward to me in case you'd like some consulting help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I'm trying to create a Wix 4 installer to properly install a C# COM Addin for MS Office. That needs to:
To do that I have:
-- the entry for the dll,
-- lots of <RegistryValue Root="HKCR" entries for the COM registration
-- some <RegistryValue Root="HKCU" entries to tell Office the COM object exists
That all works fine if the installing user has elevated (admin) rights.
The Bundle gets created as a 'perMachine' bundle, so when run as a normal user, it pops up an elevated rights prompt, asking for an admin id and pwd. When I run that, the install works, but all the HKCU entries get written to the admin user's hive, not the local user. Is there anything I can set to ensure the HKCU entries get added to the hive for the user running the setup exe, not the admin giving the permission?
I've also tried pulling just the HKCU entries into a separate MSI and marking that as perUser, but when I do, that makes the Bundle a perUser bundle, doesn't pop up the Admin permission request and fails to install.
Can I configure the setup bundle so it installs some of the MSIs as perMachine (to register the COM Dll) and some as Per-User (to write the user's entries)?
Beta Was this translation helpful? Give feedback.
All reactions