Kryptonic
Posts: 10
Joined: Thu Oct 16, 2008 12:43 pm

Execute BAT file during install?

Hi!

During my setup routine i would like to execute a BAT file... The bat file makes use SQLCMD to detect / setup the database required for the application...

What would be the best way of doing this? is there anyway of doing it transparent to the UI so the command window doesnt pop up (incase the user closes it down or something silly!)

Is there a better way of doing it? BAT file was the first thing that sprang to mind?

Many thanks,
Will
Cristi
Posts: 34
Joined: Wed Oct 08, 2008 8:44 am
Contact: Website

Re: Execute BAT file during install?

Hi,

There are several possible approaches:

1. If you have an Enterprise license the recommended method is to use the SQL Scripts feature.
2. If you do not have an Enterprise license you can use Custom Actions. There are 2 possible approaches :
a. you can create a Custom Action that will invoke the "CreateExeProcess" function exported by "aicustact.dll" (a file included in the AI package). For more details see the following post:
http://www.advancedinstaller.com/forums ... 908#p14908
b. you can create a VB Script Custom Action that will hide the Command Prompt window. For more details see the following post:
http://www.advancedinstaller.com/forums ... 948#p12948

Best regards,
Cristi
______________________________
Cristi Costache
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”