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

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

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?

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?

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?

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?

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”