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.
Photo

Upgrade/ALLUSERS Problem


2 replies to this topic

rgraham

rgraham
  • Members
  • 16 posts

Posted 06 October 2005 - 12:25

I am creating an Upgrade msi setup uisng VS.NET.

I understand how to set the upgrade codes etc.

However, the problem is I do not know if any given user selected the per-machine or per-user option.

So I have two questions

1) How do I determine this and dynamically configure my new setup to default to the same mode so it uninstalls the existing application correctly.

2) Is it possible to "Change modes", i.e if the original setup was done per-user, can it be successfully uninstalled, then the new install be performed per-machine from a single upgrade msi?

Thanks in advance!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 October 2005 - 14:21

I think this can be detected using the MSI API. InstallShield automatically adds a custom action for that purpose.

rgraham

rgraham
  • Members
  • 16 posts

Posted 06 October 2005 - 15:03

Thanks for the response.

As far as Issue 1, it is potentially a hassle but I feel certain it can be solved.

If worse comes to worse, I assume I can look at the registry - this is only an issue (I think) if the install is run by an Administrator and they selected Per-User.

Correct me if I am wrong, but I would assume that any rational administrator who is installing software for a restricted user will install per-machine?

And I know a user who is not an admin but can install software can only install per-user, but I can handle that case by setting ALLUSERS to 2 in the upgrade and it will automatically downgrade to per-user.

I believe the only case where I could have a conflict is where an admin installs software per-user instead of per-machine.

My bigger concern is the second issue. I am sure there is a way to get and set the ALLUSERS property at the beginning of the install. But in order to not remove example an Access DB that has been in use I am running RemoveExistingProducts last. So I assume that to upgrade with a change in per-user to per-machine or vice versa could be tricky or maybe veen not possible.

Any insight into this one? I am manually authoring the MSI - I do not have ISS :-(

Thanks