stevefal
Posts: 119
Joined: Wed Sep 03, 2008 9:02 pm
Location: Washington USA
Contact:  Website

Can I avoid removing and re-adding a user on upgrade?

Wed Dec 10, 2008 12:15 am

I use AI's Users and Groups feature to add a special user. Later that user is used by the app in the creation of registry entries, etc, including setting permissions for the special user.

Upon Upgrade, even though the properties of the user will not change, installation removes the original version of the user, and later adds the user back.

Problem is, with Windows, even though the user name is the same, the underlying SID (security ID) will be different after such an upgrade, and therefore permissions established before upgrade are broken. That is, logging as the named user will not invoke the seemingly corresponding permissions. This is a show-stopper for me, and I'd assume for many scenarios. Setting object permissions for a user is common.

Is there a way to avoid removing an AI-installed user upon upgrade?

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Re: Can I avoid removing and re-adding a user on upgrade?

Wed Dec 10, 2008 10:36 am

Hi,

Currently Advanced Installer doesn't support a way of conditioning the uninstall of an user account. However, I have added this improvement on our TODO list and it will be available in a future version. Thank you for your suggestion.

Until then, you can try conditioning the uninstall of the user account manually:
- open the .AIP file with a text editor
- find the "caphyon.advinst.msicomp.MsiInstExSeqComponent" component
- find the "AI_UninstallAccounts" action
- set its "Condition" attribute to:

Code: Select all

"VersionNT AND (REMOVE = "ALL") AND (NOT UPGRADINGPRODUCTCODE)"
- save and close the file
- rebuild the project

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

stevefal
Posts: 119
Joined: Wed Sep 03, 2008 9:02 pm
Location: Washington USA
Contact:  Website

Re: Can I avoid removing and re-adding a user on upgrade?

Wed Dec 10, 2008 4:41 pm

Thanks Cosmin, I'll try it.

Is there anything I might do in the AI UI that would overwrite this manual change? Just being careful...

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Re: Can I avoid removing and re-adding a user on upgrade?

Wed Dec 10, 2008 6:26 pm

Hi,

No, the UI cannot control the conditions of the actions which handle user accounts.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”