rafw86
Posts: 11
Joined: Tue May 19, 2020 9:43 am

Do not remove user when uninstalling

Tue May 19, 2020 10:02 am

I have an installer project which consist of installations of 3 applications:
- 1 desktop wpf application
- 2 windows services which I am developing by my own as well
The services have a requirement to be installed for a specific user which I am creating by your "Users and Groups" feature when installing. I would like to keep the user when uninstalling and also do not do anything with it when upgrading. Is there any way to do so?
Other option is to help me with deleting the user completely from the system when uninstalling without reboot. Currently I am getting this effect after each new reinstallation under the C:\Users folder:
usersissue.PNG
usersissue.PNG (3.9 KiB) Viewed 963 times
This happens because of some left NTUSER.DAT files which the deinstaller cannot clean up. For me an acceptable solution will be just not to touch the user when installed once. But if you are able to show me a way of removing the user on uninstall completely then it will be even better.

Kind regards,
Rafael

Catalin
Posts: 4405
Joined: Wed Jun 13, 2018 7:49 am

Re: Do not remove user when uninstalling

Tue May 19, 2020 12:03 pm

Hello Rafael,

If you want to condition the uninstall process of the user created by your setup package, you can go to "Table Editor" page --> "Install Execute Sequence" table and condition the "AI_UninstallAccounts" action.

Please note that the "Enterprise" suite (or above) is required for the "Table Editor" feature.

Hope this helps.

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

rafw86
Posts: 11
Joined: Tue May 19, 2020 9:43 am

Re: Do not remove user when uninstalling

Fri May 22, 2020 12:33 am

Thanks, this way I was able to disable the user removal. It's not ideal but it solved my problem.

Catalin
Posts: 4405
Joined: Wed Jun 13, 2018 7:49 am

Re: Do not remove user when uninstalling

Fri May 22, 2020 12:26 pm

You are always welcome!

I am glad you got this working.

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

Return to “Building Installers”