AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Run Batch file from VB script in installer? Run Python?

I think this cannot be done but wanted to be totally sure.
Can I call a BAT file from a custom action VB script?

I would like to do this because I was running a BAT file a custom action and I can't figure out how to give nice return code differentiation for debugging. I would love to provide details in a Property or in the Log. So I tried to call a VB script to side-effect one of the Installer's public properties, but I can't do that because VB needs access to the session by direct calling from the installer.

So instead I'm trying to do it the other way, call the VB directly and have it call the BAT file.

A similar question would come up if I would like to run a python script from a custom action.
thank you!

Refs;
http://www.advancedinstaller.com/forums ... f=2&t=1174
Can I pass session properties to a BAT in a custom action?
by Dave Bowden
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Run Batch file from VB script in installer? Run Python?

Hi,

You can create a VBScript custom action which calls a BAT file, then add that VBScript in a "Launch attached file" custom action in your project. Also, you need to add the BAT file in the Files and Folders page either as a temporary file or as a regular file.

You can also run a Python script from a custom action.

Let us know if this helped and do not hesitate to ask us any other question.

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

Return to “Common Problems”