Jump to content

This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.


1 reply to this topic


  • Full Members
  • 437 posts

Posted 11 February 2012 - 22:21

Hi all,

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.microsof...ibrary/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

A little confused so any help or info that would help clear this up
would be greatly appreciated!

Stefan Krueger

Stefan Krueger


  • Administrators
  • 13,269 posts

Posted 13 February 2012 - 10:28

If you set MSIINSTALLPERUSER=1 the install will become per-user instead of per-machine. This means that ProgramFilesFolder gets redirected to a location where the current user can write without admin privileges: %LocalAppData%\Programs. This means you don't need a UAC prompt. But it also means that the application is installed only for this user. If a different user logs on, he cannot use the application, until he also installs it (so you end up with multiple copies).
The biggest problem with MSININSTALLPERUSER in my opinion is that it requires MSI 5, so it's only avaialöble on Windows 7/Windows Server 2008 R2 or above. It's not available on XP or Vista or Server 2008.