PDA

View Full Version : How to execute a batch file?



ottoyu
06-14-2004, 01:12 PM
I have created a Windows Installer Projects. During the installation, I would like to execute a batch file to add a local user group to the target system. Can someone show me how to do that?

Thanks,
Otto

RobertDickau
06-14-2004, 06:49 PM
Please search the InstallShield Knowledge Base (http://support.installshield.com/kb) for "launch batch file"; this should return some possible approaches, such as the one in KB article Q105173.

ottoyu
06-15-2004, 10:51 AM
Robert:

Thanks for pointing me to the right articles. I followed the steps to create an exe Custom Action and in the command line I put the path of my .bat file.
But when I ran the installation, I got Err. 1722. I am attaching the screen shot for my Custom Action. Can you please help me to find out what I did wrong?

Regards,
Otto

RobertDickau
06-15-2004, 11:14 PM
I don't see the screenshot, but 1722 means "A program run as part of the setup did not finish as expected." Perhaps set the action properties to ignore the return value?

ottoyu
06-17-2004, 11:02 AM
sorry, let me send you the screen shot again.

RobertDickau
06-17-2004, 10:07 PM
A couple things:

You have cmd.exe as the executable name, so you perhaps don't need "cmd" at the beginning of the command-line argument property.

[INSTALLDIR] will automatically end with a backslash (all Directory properties do), so you can remove the backslash before "bin".

ottoyu
06-21-2004, 12:26 PM
Thanks all your help. I got it now.

Regards,
Otto