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!

mustafa
Posts: 3
Joined: Wed Jun 29, 2016 6:23 am

Running .bat file before lunching application

Hi dears,

I'm new to Advanced Installer. After Installing the file setup, I need to run a ".bat" file before running my ".exe" file every time. I found to add it, setting it's attributes as (Hidden, Vital and System), but I need to run it every time before lunching the application.

Please help me, Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Running .bat file before lunching application

Hi and welcome to our forums.

In order to achieve this you can add that BAT file in the "Files and Folders" page of your project, then go in the "Custom Actions" page and add a "Launch file" custom action which will run the BAT file after the "Install Execution Stage -> Finish Execution" action group.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mustafa
Posts: 3
Joined: Wed Jun 29, 2016 6:23 am

Re: Running .bat file before lunching application

Thanks for quick response,
As you said, I added the .bat file to File and Folder, then added a Custom Action, File Launch with this format "[#run_server.bat]", but still no file opens with this. Please let me know where the problem is.
Thanks.
Attachments
Capture.PNG
Capture.PNG (67.18 KiB) Viewed 2414 times
mustafa
Posts: 3
Joined: Wed Jun 29, 2016 6:23 am

Re: Running .bat file before lunching application

And here is another question,
The user that installs my application, every time that opens the file, can this ".bat" file been run before running the main file?
Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Running .bat file before lunching application

Hi,
As you said, I added the .bat file to File and Folder, then added a Custom Action, File Launch with this format "[#run_server.bat]", but still no file opens with this. Please let me know where the problem is.
I'm not sure why that BAT file does not run when you install the application. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them?
The user that installs my application, every time that opens the file, can this ".bat" file been run before running the main file?
I'm afraid that the BAT file will run before your application only when it is installed, not when the user double-clicks the main file. To achieve this you need to modify your application, so that it will launch the BAT file by itself.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”