rbfen
Posts: 10
Joined: Fri Feb 04, 2011 4:55 pm

Retaining group membership on upgrade?

Hi there, I have a program that creates local Groups. Clients will add either local accounts or domain accounts into these groups. We now have a new version of software and during the upgrade process, since the upgrade type is 'Uninstall old version first and then install new version', the groups appear to be removed and re-added, thus wiping out the group membership.

Is there any way around this? The only options available for 'Users and Groups' are -Fail if the group already exists and -Skip group creation if the group already exists. I ahve selected the latter in my project.

Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Retaining group membership on upgrade?

Hello,

Here's a similar thread (stop deletion of users or group on uninstall) to help you with this.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rbfen
Posts: 10
Joined: Fri Feb 04, 2011 4:55 pm

Re: Retaining group membership on upgrade?

Mihai, I did see that earlier thread and have made the change in the tables screen, rebuilt the project, attempted an upgrade and the Groups are still being recreated or emptied. I tried 1=2 and 1 = 2.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Retaining group membership on upgrade?

In an "Uninstall old version first and then install new version" upgrade type the old version is uninstalled followed by the installation of the new version.
Those changes should be implemented in the target, not upgrading installer.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rbfen
Posts: 10
Joined: Fri Feb 04, 2011 4:55 pm

Re: Retaining group membership on upgrade?

Mihai, not sure that I understand when you say these changes should be implemented in the target?

Currenly users have version 2.0 of our software. When we send them our upgrade, 2.1, it will destroy all of the group memberships and I do not know how to get around this?

Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Retaining group membership on upgrade?

Hello,

In this case here're a couple solutions you can try with the upgrading package:
1. Set "Skip group creation if the group already exists" error policy and try to change the upgrade order to "Install new version first and then uninstall old version"
2. Set "Install Condition" to :

Code: Select all

NOT OLDPRODUCTS
This way the users or groups will be excluded from any upgrade installation. Instead, they'll be installed only when there's no previous version of your product on the target machine.

Let us know how this turns out.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rbfen
Posts: 10
Joined: Fri Feb 04, 2011 4:55 pm

Re: Retaining group membership on upgrade?

Thanks for the suggestion mihai, though when i try to switch to 'Install new version first and then uninstall old version' I am warned that Temprorary files, IIS and SQL are not compatible with this upgrade order. Since I use all of those, I guess this is not an option for me. Looks like I will have to take care of this outside of Advanced Installer somehow.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Retaining group membership on upgrade?

You're welcome. You can also try the second suggestion and see if that suits your scenario.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”