PDA

View Full Version : How to run a batch file from installascript



kvsraju
12-12-2003, 06:35 AM
Hi,

I am using ISDev7.x Basic MSI Project.

I tried to run a batch file(.bat) from installscript:

if (LaunchAppAndWait ("CMD.EXE", "/C "^"\" C:\\Program Files\\myProduct\\start_tomcat.bat\"", nWait) < 0) then

MessageBox("Unable to run batch file", INFORMATION);

endif;

It is showing the command window and immediately disappearing the window. i am unable to identify whether the batch file is executed successfully or not.

But the same batch file is working fine, when i run it from command prompt.

Thanks in advance

-kvs

jippel
12-15-2003, 01:30 AM
Hi,

I Recommend to try this:

Extended Isscript (http://www.installsite.org/pages/en/isp_ext.htm)

There you can find Extended Version of LaunchAppAndWait.

-JiPPE

laozhuang
12-15-2003, 04:19 AM
have the same problem!Who can tell it.

jippel
12-15-2003, 04:59 AM
Try this:

if (LaunchAppAndWait ("CMD.EXE", "/C C:\\Program Files\\myProduct\\start_tomcat.bat", nWait) < 0) then

-JiPPE

laozhuang
12-15-2003, 09:23 PM
Thank jippel!
But!Still can't execute successful under WINXP and win2003!