tomas.maruska
Posts: 38
Joined: Fri Jul 19, 2013 11:49 am

Duplicating users folder when upgrading

Hi,

We're creating new user account for our services while installing our application.

We have noticed that after upgrade it makes new folder in windows Users folder, with name Username.XXX where XXX is number and it's incrementing after every upgrade.

I have checked option 'Skip user creation if the user already exists'.
It can be reproduced at least on Windows 7 and newer.
I'm using Advanced Installer 11.2.1

Please find attached screenshot of users folder, and advanced installer Users screen.

Can you tell me why is this happens? Is there any way to avoid this behavior?

Regards,

Tomas Maruska
Attachments
users.png
users.png (11.4 KiB) Viewed 10224 times
s1.PNG
s1.PNG (87.47 KiB) Viewed 10224 times
s2.PNG
s2.PNG (89.9 KiB) Viewed 10224 times
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Duplicating users folder when upgrading

Hi Tomas,

We tried a few packages but could not reproduce your problem.

Can you please mail us at support at advancedinstaller dot com the aip file and download links to two different packages you have created?
To see if we can reproduce the problem with your project. Maybe you have something configured in it that leads to this situation.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tomas.maruska
Posts: 38
Joined: Fri Jul 19, 2013 11:49 am

Re: Duplicating users folder when upgrading

Hello,

I sent you files you've requested.

Regards,

Tomas Maruska
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Duplicating users folder when upgrading

Hi Tomas,

I just got to test your packages, sorry for the delay.

So what I did was to take a clean Win 7 SP1 virtual machine, installed on it .NET 4.5.1 and SQL Express 2008 R2, then installed version 1 and version 2 of
your application, one by one. V2 automatically removed V1 from the machine, but the second folder for the user accounts was not created.

As you can see in the attached picture only one user folder remains for the user account. Is there something in my testing steps missing? Also, have you tried this on multiple clean virtual machines to see how it behaves for you.

Regards,
Bogdan
Attachments
image.png
image.png (243.89 KiB) Viewed 10185 times
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tomas.maruska
Posts: 38
Joined: Fri Jul 19, 2013 11:49 am

Re: Duplicating users folder when upgrading

Hi Bogdan,

I've tried it again on clean windows 7 x86, fully updated. You are right - it's not reproducible.

Only way I can only reproduce duplicating user folder is, when I uninstall package and install it again. But it's quite understandable, I guess, because uninstall removes user, and new install creates new one, with same name (but different ID). Am I right?

Best regards,

Tomas Maruska
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Duplicating users folder when upgrading

Hello Tomas,

I've tested the scenario and I was able to replicate the behavior. This happens because when the user account is removed (during the uninstall process) its associated folder created under "C:\Users" location is not deleted. After the same user account is created (during another installation) for the second time and you are logging in the created user account, Windows tries to create an user folder under "C:\Users" location having the same name as the user account. However, considering this folder already exists (because it was not deleted during the first uninstall) Windows will create another user folder with the following name:

Code: Select all

Username.ComputerID.<xxx>
I've added in our bug tracking system a task to investigate why the user folder is not deleted on uninstall and we'll try to add an improvement in a future version of Advanced Installer. Thank you for bringing this to our attention. I'll notify you when we have an update for this.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tomas.maruska
Posts: 38
Joined: Fri Jul 19, 2013 11:49 am

Re: Duplicating users folder when upgrading

Hi Daniel,

Thanks for reply. Please, let me know when you release version which fix this.

Best regards,

Tomas Maruska
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Duplicating users folder when upgrading

You're welcome Tomas.

We'll let you know when an improvement will be added.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Duplicating users folder when upgrading

Hello,

This was fixed in version 13.5 of Advanced Installer released on December 14th, 2016.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tomas.maruska
Posts: 38
Joined: Fri Jul 19, 2013 11:49 am

Re: Duplicating users folder when upgrading

Dear Dan,

It's still reproducible. Tested on Window 10 Enterprise

1.) tree times installed and uninstalled package
2.) result is 3 folders in C:\Users folder, see attached screenshot

Used AI version is, obviously, 13.5

Regards,

Tomáš Maruška
Attachments
dup.PNG
dup.PNG (30.14 KiB) Viewed 9112 times
tomas.maruska
Posts: 38
Joined: Fri Jul 19, 2013 11:49 am

Re: Duplicating users folder when upgrading

Reproducible also with "delete user profile folder when user account is deleted" checked.

T.M.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Duplicating users folder when upgrading

Hello Tomáš,

I've tested and also replicated this issue on a WIndows 10 machine. After talking with our development team they informed me that this option is not 100% sure. There are situations when inisde the user profile folder might be several resources (i.e. "Libraries" sub-folder) marked as read-only which cannot be deleted. This is why we cannot guarantee that all the folder resources can be deleted, thus the folder and certain resources inside may indeed be left on the system after uninstall.

Currently this is still a limitation of our "Users and Groups" support. Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”