ConfigFileLoad

InstallShield 2019 » InstallScript Language Reference

The ConfigFileLoad function loads a copy of the specified system configuration file into memory so that other advanced configuration file functions can be called to operate on the file. Specify the name of the system configuration file you want to edit in szConfigFile or pass a null string ("") in szConfigFile to edit the default system configuration file, which is set initially by the installation to the bootup Config.sys file that is used by the system.

Note • Before using any of the advanced configuration file functions, you must first call ConfigFileLoad to load the system configuration file into memory. After you modify the file, call ConfigFileSave to save it to disk. To obtain the fully qualified name of the default system configuration file, call ConfigGetFileName. To make another file the default system configuration file, call ConfigSetFileName.

Note that you cannot call ConfigFileLoad to create a new configuration file. To create a new configuration file, use CreateFile and CloseFile; this creates an empty file. Then use ConfigFileLoad and other functions to load and modify the file as needed.

Do not mix the Ez configuration file functions with the advanced configuration file functions. After calling the ConfigFileLoad function, you cannot use the Ez configuration file functions until you use the ConfigFileSave function to save your changes.

Syntax

ConfigFileLoad ( szConfigFile );

Parameters

ConfigFileLoad Parameters

Parameter

Description

szConfigFile

Specifies the fully qualified name of the system configuration file to load into memory. To load the default system configuration file, pass a null string ("") in this parameter.

Return Values

ConfigFileLoad Return Values

Return Value

Description

0

ConfigFileLoad successfully initialized the configuration file buffer. If szConfigFile specified an existing configuration file, the file was loaded into the buffer; otherwise, an empty buffer was created.

< 0

ConfigFileLoad was unable to initialize the configuration file buffer.

See Also