We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

dhaval0129
Posts: 34
Joined: Mon Jul 22, 2013 7:19 pm

Run the batch script before files get copied

Hi,

I want to run the batch script, before files are being copied by installer to install location,I am trying to run batch script from custom actions but since that script not copied yet by installer that action does not get executed.

Custom actions that I am using Being from InstallUISequence.Is there any workaround to this issue ?

Thanks
Dhaval Joshi
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Run the batch script before files get copied

Hello Dhaval,

Can you please try to add the related .bat file as a temporary file and see if the behavior still persist?
Temporary Files are copied on the target machine at the beginning of the installation and are deleted at the end of it, ensuring you have access to them throughout the entire install process.

Please keep in mind that Temporary Files are copied during the CostFinalize standard action, at the beginning of the setup and removed during the InstallFinalize standard action.

Please let us know if that helped otherwise give us more details about your specific scenario(what do you want to achieve through the .bat file and maybe I will be able to suggest you a workaround).

Happy New Year,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dhaval0129
Posts: 34
Joined: Mon Jul 22, 2013 7:19 pm

Re: Run the batch script before files get copied

Yes, the behavior is still the same if I add .bat file temporary files, in costfinalize section, what I am trying to do is delete all file previous files using batch script starting name with unifiled-*.war and then have installer copy new files, I am attaching project file
Attachments
ClarityUpdater.aip
(89.61 KiB) Downloaded 345 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Run the batch script before files get copied

Hi Dhaval,

First of all I apologize for my delayed reply.
I've attached a .zip archive which contains a sample which implements a similar scenario.

I have a .bat file which use a del command to delete all the *.txt files from given path(C:\Example\*.txt). This .bat file is added as a temporary file and it is launched using the predefined Launch File or Open URL custom action. This custom action it is executed only at install time.

Please let us know if that helped, otherwise give us more details about your specific scenario.

Best regards,
Dan
Attachments
DelSample.zip
(2.55 KiB) Downloaded 338 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”