5

What happens if an MSI installation is set to install as per-user, and 3 different users log on and each install the app? Will Windows Installer recognise that the same MSI has already been installed into Program Files and therefore it doesn't need to install it again?

What happens if one of the 3 users then uninstalls the app while they are logged in? Will Windows Installer recognise that 2 other users still need the app to be installed and therefore leave alone the app folder in Program Files?

CJ7
  • 653
  • 9
  • 24
  • Cross-posting is the wrong thing to do. See: http://meta.stackexchange.com/questions/64068/is-cross-posting-a-question-on-multiple-stack-exchange-sites-permitted-if-the-qu Your other question: http://superuser.com/questions/400507/what-happens-when-you-uninstall-a-per-user-installation – Zoredache Mar 14 '12 at 07:48

1 Answers1

5

Per-Machine vs. Per-User Installations

It depends on your configuration. The Windows Installer allows you to perform an install on a per-user or per-machine basis. What this mostly affects is the value of certain folder properties at install time such as the DesktopFolder property, ProgramMenuFolder property, StartMenuFolder property, and StartupFolder property. Whether these values are the per-machine or per-user values is determined by the ALLUSERS property.

Problems Caused by Per-User Installations

There are several common scenarios that an arise when the choice of per-user vs per-machine is given to the user, one of them is that if two different users on the system install the software with ALLUSERS="" they will both have their own shortcuts and Add/Remove Programs entries made (which is fine and is by design). However, if some of the files are installed to a shared location (such as ProgramFilesFolder) and one of the users uninstalls the software, the other user will not be able to use the software even though their shortcuts and Add/Remove Programs entries are still intact. In other words, the two installed instances of the software will not "know" about each other.

More info on this page.

Lucas Kauffman
  • 16,818
  • 9
  • 57
  • 92
  • If one of the three users performs an uninstallation of the app, will this delete the files out of ProgramFiles? – CJ7 May 02 '12 at 06:00
  • Good question, I think that would depend on the programmenufolder property. I think the best way to find out is to test it yourself. – Lucas Kauffman May 02 '12 at 06:06
  • No, it will not delete the files in ProgramFiles provided the MSI package is properly authored. The files are reference counted. With that said, per-user installations with MSI are conceptually flawed in my opinion. – Stein Åsmul May 12 '14 at 23:35