IniDelete

Deletes a value from a standard format .ini file.

IniDelete Filename, Section , Key

Parameters

Filename

Type: String

The name of the .ini file, which is assumed to be in A_WorkingDir if an absolute path isn't specified.

Section

Type: String

The section name in the .ini file, which is the heading phrase that appears in square brackets (do not include the brackets in this parameter).

Key

Type: String

The key name in the .ini file. If omitted, the entire Section will be deleted.

Error Handling

An exception is thrown on failure.

Remarks

A standard ini file looks like:

[SectionName]
Key=Value

Related

IniRead, IniWrite, RegDelete, RegDeleteKey

Examples

#1

IniDelete "C:\Temp\myfile.ini", "section2", "key"