mozilla
Your Search Results

    XPInstall API Reference:WinProfile Object:Methods:writeString

    Summary

    Changes a value in a .ini file.

    Method of

    WinProfile object

    Syntax

    Boolean writeString ( String section, String key, String value);

    Parameters

    The method has the following parameters:

    section
    Section in the file, such as "boot" or "drivers".
    key
    The key in that section whose value to change.
    value
    The new value.

    Returns

    True if successfully scheduled, otherwise, false.

    Description

    The writeString method is similar to the Windows API function WritePrivateProfileString. To delete an existing value, supply null as the value parameter. Unlike the WritePrivateProfileString function, this method does not support using a null key to delete an entire section. Values are not actually written until performInstall is 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");
    

    Document Tags and Contributors

    Contributors to this page: Anonymous
    Last updated by: Anonymous,