Custom Action VBS file deleted before being run during uninstall - Advanced Installer Community
SteveStout
Posts: 2
Joined: Wed Nov 19, 2014 11:18 pm

Custom Action VBS file deleted before being run during uninstall

I have version 12.4.2 and I am having an issue with the uninstall process.

I have an installed .VBS file which calls an installed .BAT file to remove a line in the HOSTS file which was added during the install process.

It appears that the files used during the uninstall process are being removed from the hard drive before they are being called to run. Thus, I get an error that they can not be found.

The VBS file properly runs the BAT file when called from a command line so I know the scripts work. The scripts worked in the prior version 8.4 Advanced Installer I was using so I am confident they are correct.

However, the Custom Actions section of Advanced Installer has changed quite a bit, and I am unable to find the 'Uninstall' section to order the uninstall steps properly. I had no problems with this in version 8.4. The current version 12.4.2 does not seem to have any control over the uninstall order. Maybe I am missing something here, but I just do not find any details on this in the online documentation, or the forums.

I have tried making these attached files, but this does not seem to work. The VBS file needs to call an installed file it seems. The VBS is 'quietly' running a command window which deletes a line of text if needed.

Can I not do this anymore with the new version?

Attached is my AIP file and the scripts for your consideration.

Thanks,

Steve Stout
Kagan Publishing
Attachments
Kagan_RMS_edit_1.aip
(42.44 KiB) Downloaded 253 times
RestoreHosts.vbs.txt
(148 Bytes) Downloaded 228 times
restore_hosts.bat.txt
(359 Bytes) Downloaded 227 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Custom Action VBS file deleted before being run during uninstall

Hi Steve,
However, the Custom Actions section of Advanced Installer has changed quite a bit, and I am unable to find the 'Uninstall' section to order the uninstall steps properly.
From the Execution Stage Condition section of the custom action properties you can set the execution time of the custom action. However, your project seems to be correctly configured. You can try to remove the conditions from the Condition field in order to see if this makes any difference. Just set the execution time for the custom action according to your scenario.

Also, can you please tell us if the behaviour persists when creating a new sample project (just to test the custom actions)?
I have an installed .VBS file which calls an installed .BAT file to remove a line in the HOSTS file which was added during the install process.
Please note that you can use the predefined Launch file custom action to launch your .bat file. For details, please take a look on the How to launch a CMD or BAT file? article with related information for hints and guidance.

By the way, can you please send us the full verbose log of the installation process to support at advancedinstaller dot com so we can investigate it? If it contains confidential information you can send us a small test project which reproduce this behavior.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”