Zsolt Kollarits
Posts: 366
Joined: Fri May 29, 2015 10:36 am

Some files remain on hard drive after uninstallation

Hi Advanced Installer Support Team,

Please let me draw your attention on a potential issue of Advanced Installer 12.2: some resource files remains on local hard drive after uninstalling our product. Obviously we´d like to make sure that all files installed/created by us will be cleared when a customer is about the delete our product.

Here are the steps of reproduction, please perform them by using the attached sample projects:
1. Open Sample project 4 - Client.aip and create a build with version number 1.0.0.
Note: I´d like to keep extracted msi and cab files stored after the installation, so the relevant checkbox (in Builds section) is enabled.
2. Install the outcome (single exe) on a PC. (I used a 64-bit Windows 8 PC for this purpose.)
Note: An .msi and a .cab file appears under "C:\Users\zsolt.kollarits\AppData\Roaming\Your Company\Sample project 4 - Client\install" location as expected.
3. Create a build with version number 2.0.0 (new major update).
4. Use the Update project.aip to create an update for the exe of 2.0.0.
5. Install version 2.0.0 update on the PC by running "Updater for Sample project 4".
Note 1: I´d expect the new resource files to go to "C:\Users\zsolt.kollarits\AppData\Roaming\Your Company\Sample project 4 - Client\install" location, however the updater puts them into "C:\AppData\Roaming\Your Company\Sample project 4 - Client\install" folder instead.
Note 2: The updater also creates a temp folder for the copy of the actual setup file under "C:\ProgramData\Your Company\Sample project 4 - Client\updates".
6. Go to Programs & Features and uninstall Sample project 4.

At this point 2 folders
C:\Users\zsolt.kollarits\AppData\Roaming\Your Company\Sample project 4 - Client\install
C:\ProgramData\Your Company\Sample project 4 - Client\updates
out of 3 will be cleared, but 1 folder
C:\AppData\Roaming\Your Company\Sample project 4 - Client\install
will remains untouched with all the files inside of it.

Could you please try to reproduce the described behaviour? Would it be possible to free all 3 folders during uninstallation?

Why our resource files are stored in different places like:
under "C:\Users\zsolt.kollarits\AppData\Roaming\Your Company\Sample project 4 - Client\install" in case of normal installation procedure and
under "C:\AppData\Roaming\Your Company\Sample project 4 - Client\install" in case of installing the exact same package via the updater?

Thanks in advance for your answers!

Regards,
Zsolt Kollarits
Attachments
Sample project 4 - Client.zip
Sample projects
(5.24 KiB) Downloaded 333 times
Zsolt Kollarits
Posts: 366
Joined: Fri May 29, 2015 10:36 am

Re: Some files remain on hard drive after uninstallation

Hi Advanced Installer Support Team,

After posting my previous comment I performed some further test and decided to set a much more generic location at Builds/Extract location in order to keep all extracted resource files at the same place. For this purpose I replaced
[AppDataFolder][|Manufacturer]\[|ProductName]\install by [CommonAppDataFolder][|Manufacturer]\[|ProductName]\install and went through on the reproduction steps of my initial letter. Surprisingly enough the updater failed to install newer packages (2.0.0 and 3.0.0).

From what I can see both the manual installation (double click) and also updater based installation uses my C:\ProgramData\Your Company\Sample project 4 - Client\install folder for storing msi and cab files. Nevertheless installation fails because updater puts the necessary resource files - msi and cab files of version 2.0.0 - into that particular folder but in the meantime it also tries to clear that folder in order to get rid of the resources of the previous (1.0.0) installation. Personally I think there is a confusion and a potential bug here.

Note: Using a folder path which is a bit more unique, e.g. [CommonAppDataFolder][|Manufacturer]\[|ProductName]\[|ProductVersion]\install, leads to such product builds which are working properly, in this way version 1.0.0 can be upgraded to 2.0.0 without any problems.

For keeping all extracted result files in the same folder we´d like to use the same, generic folder for all installations and updates, creating product version based subfolders is not the way to go for us. Do you think it´s possible somehow?

Thanks in advance for your answers!

Regards,
Zsolt
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Some files remain on hard drive after uninstallation

Hello Zsolt,

I've tested and replicated the behavior. Please give us some time to further investigate this and I'll get back to you as soon as I have a resolution.

Thank you for your patience and understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Some files remain on hard drive after uninstallation

Hello Zsolt,

I apologize for my delayed reply. After further analyzing your installation scenario this happens because you are using our "Install support service" option from "Updater" page, which allows the Updater to install updates without elevation. When this option is used the Updater will run under "Local System" account.

This is what it happens:
1. when launched, the Updater downloads the updates setup, in the location specified in "Updater" page -> "Download updates in this folder" field (i.e. "[CommonAppDataFolder][Manufacturer]\[ProductName]\updates\"), and launches it
2. the launched updates setup extracts its embedded files in the location specified in "Builds" page -> "Configuration" tab -> "Extract location" field (i.e. "[AppDataFolder][|Manufacturer]\[|ProductName]\install\")
3. since the setup is launched under "Local System" account the above EXE extract location will be resolved like this:

Code: Select all

C:\Windows\System32\config\systemprofile\AppData\Roaming\
4. due to a security measure of AI setups the setup extraction to "Windows" folder is prevented and the above extract path is resolved truncated to "C:\AppData\Roaming\Your Company\Sample project 4 - Client\install"
5. on uninstall, triggered from "Control Panel", the uninstall process runs under current logged in user account and it will resolve the above EXE extraction path to the "AppDataFolder" of the current user; therefore the "C:\AppData\..." created folder will not be removed

Indeed this is an Advanced Installer limitation. We will try to add an improvement regarding this scenario in a future version of Advanced Installer, thank you for bringing it to our attention. Until then, as a workaround, as you already found you should use a per-machine EXE extract location different than the Updater download location (e.g. "[CommonAppDataFolder][|Manufacturer]\[|ProductName]\[|ProductVersion]\install").

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 366
Joined: Fri May 29, 2015 10:36 am

Re: Some files remain on hard drive after uninstallation

Hi Daniel,

First of all thanks for your investigation. In the meantime I ended up in the same conclusion you just explained, so I already use a [CommonAppDataFolder] based extract location.

Could you please let me know if any improvements arrive in the future?

Best regards,
Zsolt
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Some files remain on hard drive after uninstallation

You're welcome Zsolt.

I'm afraid we cannot give you an ETA for this, but when an improvement will be out we'll update this thread.

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

Return to “Common Problems”