rsdavis
Posts: 5
Joined: Sat Apr 29, 2006 7:37 pm

Run DOS bat file during install

I have a DOS .bat file that installs a driver and configures it that I need to run during install. How do I do that with Advanced Installer. I am not familiar with custom actions. I have created an installer that works except I need to execute a .bat file with two DOS commands in it that install a .inf file and configures the driver. The .inf file will not install by just putting the .inf file in the Driver section of Advanced Installer. I have to install it via the DOS .bat file.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Run DOS bat file during install

Hi,

You can launch the BAT file by using a "Launch file or open URL" custom action. Here are the steps:
- go to the Custom Actions page
- add a "Launch file or open URL" custom action under "InstallExecuteSequence" -> "Install"
- set the "Command Line" field of the custom action to the path of the BAT file
- make sure that the "Condition" field is set to "Not Installed"

Note that if the BAT file is in your package, you can use the "Edit" button to select it. In this case the command line will contain a file reference which looks like this:

Code: Select all

[#myfile.bat]
Since the path of the file may contain blank spaces, it is recommended to enclose the file reference in quotes:

Code: Select all

"[#myfile.bat]"
Let me know if you encounter any problems with this approach.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”