Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

WriteProfileString( )

Action: Copies a string to an initialization file.
Syntax: WRITEPROFILESTRING ("file name", "section", "key", "string")
Parameters: File name

String identifying the initialization file.


String containing the name of the section of the initialization file where string is copied. If the section does not exist, it is created. The section name is not case-sensitive, and can contain any combination of uppercase and lowercase letters.


String containing the name of the key to associate with string. If the key does not exist in the specified section, it is created. If this parameter is empty, the entire section, including all entries within the section, is deleted.


String to write to the file. If this parameter is empty, the key identified by key is deleted.

Note: On Windows 9x, use of the tab character (\t) is not supported as part of this parameter

Remarks: This function is provided for compatibility with 16-bit Windows-based applications. Win32-based applications store initialization information in the registry.
0 Profile string written
Error code Function failed  
See Also: ReadProfileString( )

if exist($IniFile)
  $result=writeprofilestring($IniFile,'Sight','Allow Takeover','Yes')
  $result=writeprofilestring($IniFile,'Sight','Allow Reboot','Yes')
  $result=writeprofilestring($IniFile,'Sight','Allow File Transfer','Yes')
  $result=writeprofilestring($IniFile,'Sight','Allow Chat','Yes')
  $result=writeprofilestring($IniFile,'Sight','Allow Remote Execute','Yes')
endif ; file exists