Remove main folder on uninstall - Advanced Installer Community
lric
Posts: 5
Joined: Tue Jan 17, 2017 4:49 pm

Remove main folder on uninstall

Dear,

I created an installer to generate the product in a certain main folder (Example: "D:\OrionEMS".) In this folder it contains the subfolders "EMS1" and "MySQL." However, when I uninstall, I can not delete the main folder, If you have any questions or comments, please feel free to contact me.

NOTE: The "APPDIR" property does not say "D: \ OrionEMS", but rather "C: \ OrionEMS", this is not correct.
Attachments
OrionEMS1.log
(470.07 KiB) Downloaded 311 times
Horatiu
Posts: 42
Joined: Tue Nov 29, 2016 1:19 pm

Re: Remove main folder on uninstall

Hello,

To fix you issue, just go to the Install Parameters section, and change the Application folder path.

Default value: [ProgramFilesFolder][Manufacturer]\[ProductName]
New value: [MyPath]\[ProductName]

Where MyPath is a property created in the Properties section of the Install Parameters section, and has the value D:

Let me know if you have any other questions.

Best regards,
~Horatiu
lric
Posts: 5
Joined: Tue Jan 17, 2017 4:49 pm

Re: Remove main folder on uninstall

Hello Horatiu,

Thanks for answering. The issue is that in the installation there is a dialog where the user can change the default folder, but when the uninstall is done the APPDIR is assigned "C: \ OrionEMS \" which is the default. I use a custom action which executes an inline vbscript to remove the main folder (which is actually my intention) and I use a property called "EMS1_Dir" that is part of the main package and in that script I can get the main installation folder through the command Left inside the script. It looks like this custom action is not working, understand? This script is in the log generated during the uninstallation and I attached it to you. Once again, I want to thank you for your commitment to this issue.
Horatiu
Posts: 42
Joined: Tue Nov 29, 2016 1:19 pm

Re: Remove main folder on uninstall

Hello lric,

The folder is not removed because it was created prior to the installation, it was already on the PC. If you want to have it removed without a custom action, create the folder during installation in the Folder dialog, or have a property with the desired path as I shown in my previous post.

If you want to remove it with a custom action:
1. Make sure your property is public(all uppercase), thus rename it to EMS1_DIR
2.Go to the Install Parameters section, and edit your property. Check the Set persistent property, so to make it available during uninstall.

Best regards,
~Horatiu
lric
Posts: 5
Joined: Tue Jan 17, 2017 4:49 pm

Re: Remove main folder on uninstall

Hi Horatiu,

I will proceed with removal with a custom action as per your instruction.

Once again, thank you for your attention. Thank you.

Lric
Horatiu
Posts: 42
Joined: Tue Nov 29, 2016 1:19 pm

Re: Remove main folder on uninstall

Hello Iric,

Glad to help. If you need any assistance let me know.

Best regards,
~Horatiu

Return to “Common Problems”