Using MSIINSTALLPERUSER
Let me give a little background on our current install. Currently we
mix HKLM and restricted file system items with User specific setting
and HKCU entries. This, of course, causes repair installs when non-
installing users launch our app.
I would like to remove all of the user specific items to make it a per
machine install and have the App handle user settings at startup.
I've seen mention that this is probably the way to go as it could get
messy mixing Machine and User items, as I know.
Then there is the camp that doesn't like the UAC prompt, which will
come into play with Per Machine installations. I came across
MSIINSTALLPERUSER (http://msdn.microsoft.com/en-us/library/windows/
desktop/dd408068%28v=vs.85%29.aspx) and wondered if I could use this
in some way. I don't know if having a Per Machine install would work
using this mechanism and don't know if our app would actually work
with the redirection.
From the article, what does this actually mean...
"When Windows Installer 5.0 installs a dual-purpose package in the per-
user context on Windows 7 or Windows Server 2008 R2, the installer
directs file and registry entries to per-user locations and does not
display UAC prompts for credentials."?
Does this mean if the install has an HKLM key to be written, it will
do so in the HKCU hive for example? If that is the case, I would
think our application would have to handle the redirection and would
require quite a bit of code changes. ??
Or should I just stay the course and continue to make our current
installation Per Machine and not worry too much about
MSIINSTALLPERUSER.
A little confused so any help or info that would help clear this up
would be greatly appreciated!
Answers (2)
Don't worry..
The MSIINSTALLPERUSER and the ALLUSERS properties can be set by the user at installation time, through the user interface or on a command line, to request that the Windows Installer install a dual-purpose package for the current user or all users of the computer.
To use the MSIINSTALLPERUSER property, the value of the ALLUSERS property must be 2 and the package has to have been authored to be capable of installation into either the per-user or a per-machine context.
"Authored" is just keeping the best practices in place by using the correct naming for folders and Registry ( especially incase of 32bit / 64bit)
Your assumption:
Does this mean if the install has an HKLM key to be written, it will
do so in the HKCU hive for example? If that is the case, I would
think our application would have to handle the redirection and would
require quite a bit of code changes. ??
Is incorrect.
so that the conversation will remain readable.