User profile not removed - 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!

srini
Posts: 81
Joined: Mon Sep 14, 2009 4:22 pm

User profile not removed

Hello,

I create user(s) using my installer. No problem with this. But when I uninstall, the created user profile (usually C:\Documents and Settings\<user>) is not removed. I am aware that this user profile is not created by the installer and therefore it is not removed by the installer. This is a problem if I run the installer again as the installer creates the user again and a profile with another name (like <username>.<hostname> or <username>.<hostname>.00) is created.

Does anybody know an easier way to perform this?

Thanks
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: User profile not removed

Hello,

You could use the net user command to remove the user through a custom action.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
srini
Posts: 81
Joined: Mon Sep 14, 2009 4:22 pm

Re: User profile not removed

Hi Gabriel,

I create the user using the installer's user section. When uninstalling the installer will the remove the user automatically.

I really do not understand where to use the 'NET USER' command.

I have tried using this in the 'InstallExecuteSequence->Uninstall' section. But the custom action failed; this may be because the installer would have removed the user alerady at this point.

Please let me know if I have to use the 'NET USER' otherwise.

Thanks
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: User profile not removed

Hello,

I am not sure I understand your problem anymore. Do you mean the user is actually deleted from the system but his folder is not? Could you give me more details about this?

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
srini
Posts: 81
Joined: Mon Sep 14, 2009 4:22 pm

Re: User profile not removed

Hi Gabriel,

The problem is:
  • I create users using the installer.
    After installation, when the user logs on using the user account created in the previous step, a profile is created (usually) in C:\Documents and Settings\<Username>.
    When uninstalled, the created user is automatically removed by the installer. But the above profile is not.
Is this clear? Please let me know otherwise

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

Re: User profile not removed

Hi,

This is the normal behavior because when uninstalling the package may not have enough privileges to delete the profile folder. Usually this is removed by an Administrator after the uninstall. You can also try using a custom action to delete the folder.

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

Return to “Common Problems”