Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

WritePrivateProfileString

  • Last UpdatedOct 29, 2026
  • 1 minute read

WritePrivateProfileString is a built-in function that writes a specified setting to the Viewer module's initialization file (Viewer.ini), using the standard properties format.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

WritePrivateProfileString

System Info

Synchronous

No

Supported

Supported

Supported

Supported

Supported

Syntax

WritePrivateProfileString(strSection,strName,strValue,strFileName)

strSection

The section name to be written.

strName

The parameter name to be written.

strValue

The value to be written.

strFileName

The path and name of the .ini file to be written.

Returned value

The function returns 1 if the file was updated successfully.

Notes

When running on Windows Embedded this function will rewrite the entire file, therefore its use is not recommended for lengthy files on Windows Embedded devices. The function will also add the following lines at the end of the file when on a Windows Embedded device:

[FileBackUpControl]

Valid=1

Examples

WritePrivateProfileString(Section,Name,Value,FileName)

WritePrivateProfileString("Options","ds1","Value","C:\Viewer.ini")

In This Topic