mathiaso
Posts: 23
Joined: Wed Feb 10, 2016 9:54 am

vbs custom action after files copied

Wed Feb 08, 2017 9:19 pm

Hi,

I have a vbs file that uses parameters like "IMAGE_DIR" that I have specified in "installed parameters".

If I set it to "immediate" execution the parameters work (checking with message boxes), but the files I need to have copied by the installer is not installed when the custom action runs.
When I run them as "deffered" the files are copied before the custom action runs, but the parameters will not work.

What can I do to have my custom action to execute after files are copied not using deffered method?

Thanks!

Dan
Posts: 4489
Joined: Wed Apr 24, 2013 3:51 pm

Re: vbs custom action after files copied

Thu Feb 09, 2017 2:02 pm

Hello,
If I set it to "immediate" execution the parameters work (checking with message boxes), but the files I need to have copied by the installer is not installed when the custom action runs.
Indeed, the files are copied on the target machine during the deferred phase. The encountered behaviour is correct.
When I run them as "deffered" the files are copied before the custom action runs, but the parameters will not work.
This is happening because a deferred custom action does not have access to installer properties. However, you can pass information process through the CustomActionData property.

Please take a look on the Pass installer properties in deferred custom action article which may be useful to you.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

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

Return to “Building Installers”