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!

MattGreaves
Posts: 8
Joined: Sat Aug 11, 2012 1:11 pm

Batch file within package

Hi all - hoping someone can help me?

I would like to create a workstation package which copies a batch file to the local HDD and then executes it. The batch file contains instructions to execute an .msi located on a network share. Could someone tell me if this is possible please and if so, how to achieve my goal?!

Many thanks,

Matt
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Batch file within package

Hello Matt,

Please keep in mind that you should use an Advanced Installer built-in functionality in order to install the related MSI. For example, you can add the related MSI as a chained package to your main installation package. Also, if you need to run a .BAT file in order to achieve a custom functionality, then you can run your .BAT file using a custom action.

However, if you want to install and launch a BAT file (i.e. MyFile.bat) after installation completes, then you can proceed like this:
- add your BAT file in "Files and folders" view.
- Go to "Custom Actions" page and add a "Launch file or open URL" custom action with sequence, scheduled after "Install Execution Stage" -> "Finish Execution" action group, like this:
  • Command: "[#MyFile.bat]"
Let us know if this helps, otherwise give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MattGreaves
Posts: 8
Joined: Sat Aug 11, 2012 1:11 pm

Re: Batch file within package

Hi Daniel,

Many thanks for those instructions - worked liked a charm! Awesome stuff :D

Cheers,
Matt
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Batch file within package

You're welcome. Glad to help.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”