Advanced Batch File Functions

InstallShield 2016 ยป InstallScript Language Reference

Advanced batch file functions differ from Ez batch file functions in that they provide greater flexibility and more control over batch files. Use these functions when you need to make more extensive or complex changes to a batch file.

To edit a batch file with these advanced functions, you must first load the file into memory by calling BatchFileLoad. When modifications to the batch file are complete, you must then save the file by calling BatchFileSave.

When an InstallScript custom action initializes, InstallShield selects the target system's startup batch file (Autoexec.bat) as the default batch file; unless changed by a call to BatchSetFileName this is the file that BatchFileLoad reads into memory if no other file name is specified. To determine the fully qualified name of the default batch file, call BatchGetFileName.

Advanced Batch File Functions

Function

Description

BatchAdd

Adds an environment variable to a batch file.

BatchDeleteEx

Deletes a line in the batch file.

BatchFileLoad

Loads a batch file into memory for editing with advanced batch functions.

BatchFileSave

Saves a batch file that has been loaded with BatchFileLoad.

BatchFind

Finds items in a batch file.

BatchGetFileName

Retrieves the fully qualified file name of the default batch file.

BatchMoveEx

Moves an item within a batch file.

BatchSetFileName

Specifies a batch file to be the default batch file.

Related Function

Related Function

Function

Description

SdShowFileMods

Creates a dialog that displays proposed file changes and offers options on how to proceed.