wholt@nabancard.com
Posts: 9
Joined: Mon Feb 01, 2021 11:15 pm

Do NOT Remove User Account on Uninstall

Use case: My Installer installs a 3rd party product (Postgres) during installation, that gets installed using a User Account created in User & Groups portion of Postgres. During Upgrades or Uninstallation of our product we are no longer uninstalling that 3rd party product (Postgres). Therefore I do NOT want my uninstaller to remove that User Account.

In addition, our Installer adds an additional user for our product services.

I tried adding NOT Installed to the Install Conditions and it did nothing.
Google searching yielded nothing relevant or helpful within the first couple of pages.
I found this link (https://www.google.com/url?client=inter ... w5XfRR_YGA) on this (AI's) site, but back to 2008. Is this still the only possible way to do what I need?

If I understand the above link, mods to it would also leave in place ALL added User Accounts done during installation?
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Do NOT Remove User Account on Uninstall

Hello,

If you do not want to remove the user created during the install process, you can proceed as it follows:
  • go to "Table Editor" page
  • "InstallExecuteSequence" table
  • add a false condition to the "AI_UninstallAccounts" action
AI_UninstallAccounts.png
AI_UninstallAccounts.png (95.72 KiB) Viewed 2017 times
AfterUninstall.png
AfterUninstall.png (133.89 KiB) Viewed 2017 times

I tried adding NOT Installed to the Install Conditions and it did nothing.
I am not quite sure what you want to achieve here.

If you want to skip the installation of the user if it already exists, you can go to "User and Groups" page and check the "Skip user creation if the user already exists" option.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”