writeString
Changes a value in a .
inifile.Method of
Syntax
Boolean writeString (
String section,
String key,
String value);Parameters
The method has the following parameters:
sectionSection in the file, such as " boot"or "drivers".keyThe key in that section whose value to change. valueThe new value. Returns
True if successfully scheduled, otherwise, false.
Description
The
writeStringmethod is similar to the Windows API functionWritePrivateProfileString. To delete an existing value, supply null as the value parameter. Unlike theWritePrivateProfileStringfunction, this method does not support using a null key to delete an entire section.Values are not actually written until
performInstallis called.Example
To set the name of the wallpaper file from the desktop section of the win.ini file, use this call:
ini = getWinProfile (getFolder("Windows"), "win.ini");
ini.writeString ("Desktop", "Wallpaper", "newpathname");
| Netscape Communications devedge.netscape.com |