Click here to Skip to main content
15,887,821 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
I have created setup using installshield and everything is work file. Now I have one batch file and want to run with setup. I know we can create custom action and I have already created custom action for run powershell script and it is working fine.

Can anyone help/guide me for using which custom action I can execute the batch file.

Also I want to run MySQL script from installshield setup, so Please help me regarding that.

Thanks
Rajesh

What I have tried:

I have tried to create different custom action but I don't know exactly which custom action is used for execute the batch file.
Posted
Updated 28-Nov-17 2:36am
v2

1 solution

The batch file has to be started in a new command shell. So the custom action is the cmd.exe executable with the batch file as argument:
[SystemFolder]\cmd.exe /c full_path_of_batch_file

Similar can be used for MySQL scripts where mysql.exe must be also started via cmd.exe to allow input redirection:
[SystemFolder]\cmd.exe /c "full_path_of_mysql.exe < full_path_of_sql_script"
Or just put the script execution into another batch file if you know the pathes in advance.

Can be all found by web research:
execute .BAT file in installshield - Stack Overflow[^]
InstallShield 2014, Custom Actions and executing sql files into MySQL - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900