cancel
Showing results for 
Search instead for 
Did you mean: 

Work with Command Events at Build Time

Work with Command Events at Build Time

Summary

Work with Command Events at Build Time

Synopsis

This article is intended to illustrate how to specify commands that run before, during and after builds with Prebuild, Precompression and Postbuild events in the InstallShield Premier product.

 

Discussion

The Windows command-line tools are used to perform various tasks related to the Windows operating system. An internal command is expected to be executed from the shell. Internal commands need to be "shelled out". An external command is expected to exist within an executable file on the client. For example, the COPY command is expected to be internal, while the XCOPY command is external.

The Events Tab on a release includes Prebuild, Precompression and Postbuild events. If it is possible to run a command from Start-Run it is expected the command can be included in the build process as an event.

Please reference the Microsoft documentation for information about various commands and see links below.
 
Example #1) Copy command "shelled out" to copy "Setup.ini" from directory "C:\" into the Disk1 directory of the current build. This example illustrates how a post build event can copy the specific *ini file to the build location. The switch '/C' is expected to carry out the command specified and then stops.
 
Cmd /C "Copy "C:\Setup.ini" "<ISReleasePath><ISProductConfigName>\<ISReleaseName>\DiskImages\Disk1\Setup.ini" "
 
Example #2) XCopy command to place the text file "somefile.txt" into the directory C:\myfilecopy.
 
XCopy c:\myfile\somefile.txt c:\myfilecopy /I

 

Related Documents

Specifying Commands that Run Before, During, and After Builds

Events Tab for a Release

 

Additional Information

The operating system Windows XP includes a help file ntcmds.chm. This file is expected to include details of some commands and their many switches. On an XP client use Start - Run:

hh ntcmds.chm

Windows Command Reference - Downloadable *.chm of the command-line tools used to perform various tasks related to Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows 7, and Windows Vista.
 
Additional information can be found here: Command-line reference A-Z
Was this article helpful? Yes No
No ratings
Comments

Most of my commands are working with the exception of rename. Any suggestions on using this command? 

I am running commands to zip the package (working)

Then copy the contents of the Program Files to another folder (working)

I then need to rename some of the config files in the new folder. None of these commands are working. (Broken)

Sample: 

Ren "D:\BUILDS\application\Copy Install\file folder\file.exe.config" "file.exe.SAMPLE.config" 

Finally I zip up the copied folder (working)