WriteProfInt

Product Feedback
Feedback

Syntax

WriteProfInt (szFileName, szSectionName, szKeyName, iValue);

Description

The WriteProfInt function modifies an .ini file by inserting or updating a profile string that assigns an integer value to a key. Note the following important points:

Parameters

szFileName

Specifies the name of the .ini file. If the filename is unqualified (that is, if a drive designation and path are not included), InstallShield searches for the file in the Windows folder. If the file does not exist, it is created in the specified folder; if a path is not included in filename, the file is created in the Windows folder. Note that if the filename is qualified with a path that does not exist, WriteProfInt will fail.

szSectionName

Specifies the name of the .ini file section in which szKeyName will be inserted or modified. The section name should not be enclosed within delimiting brackets ( [ ] ). The search for this name is not case sensitive.

szKeyName

Specifies the unique key to be updated. If a key that is to be updated does not exist in the specified section, it is created.


To delete an entire section from an .ini file, pass a null string ("") in szKeyName. To delete one or more keys from a section in an .ini file, use WriteProfString.

iValue

Specifies an integer value to assign to the unique key identified by szKeyName.

Return values

0

Indicates that the function successfully updated the specified .ini file.

< 0

Indicates that the function was unable to updated the specified .ini file.

Comments


Example