Marv
Posts: 7
Joined: Sun Jan 22, 2006 7:30 pm
Location: Tennessee
Contact: Website

Remove Folders

Hello,
I was wanting to know if it is possible to have AI to automatically remove older versions folder and the new version's folder after the user has used the Updater to download and install the newest version. I created a folder for the Updater to download to and I've already had two updates to my program. When I go to the folder I see the Updater.exe, the updater.ini and 2 folders each corresponding to the last versions. Is there a way to do this?
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi Marv,

Advanced Installer sets the folders to be deleted when the product is uninstalled, since it is the safest option.

You cannot set the folders to be deleted on upgrade. If you want to do this, the only way would be by defining your own custom action for this purpose.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
Marv
Posts: 7
Joined: Sun Jan 22, 2006 7:30 pm
Location: Tennessee
Contact: Website

Remove Folders

Hi Mike,

Thanks for the reply. How would I do the custom action to remove the folders after the product has been installed.(I don't know anything about the Custom Action) I have a default folder that the upgrade is downloaded to then the Install starts. I would just like to remove the download folder which contains the update. Here's an example of the path.

C:\Windows\ProgramFiles\Blocking Parasites Updater\Blocking Parasites for XP 1.62.

C:\Windows\ProgramFiles\Blocking Parasites Updater\Blocking Parasites for XP 1.63.

I would like to have it delete the Folder "Blocking Parasites for XP 1.62." and Blocking Parasites for XP 1.63
and leave the Main Folder "Blocking Parasites Update alone.

Thanks for any help!!!!

Marv
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi Marv,

If you don't want to write your own custom action the simplest way would be to use the updater capability to delete those folders. The updater already uses this capability to delete the folders when the product is being uninstalled.

However, deleting those folders may be dangerous if you are using patches. Also, if you try to do a repair on the installed version, Windows Installer will be unable to find the MSI.

To do this you need to create an installed custom action:

- choose the updater as the EXE for the custom action
- in the command line enter:
/m clean silent
- use the condition editor to edit the condition to:
UPGRADINGPRODUCTCODE

Schedule it on the InstallInitialize standard action.

Hope this helps.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”