# Ini_GetAllSections

> Reads all section-headers.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/ini-file-functions/ini-getallsections/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Reads all section-headers

### Syntax

Ini_GetAllSections(sFile, sSeperateChar, bReturnAsArray, bMustExist) As Boolean

### Parameters

#### sFile (String)

Filename

#### sSeperateChar (String)

Char between each section-header

#### bReturnAsArray (Boolean)

Section-list must be returned in array

#### bMustExist (Boolean)

File must exist

### Return value

If bReturnAsArray is true the list of section headers will be returned in gaValue otherwise the list will be returned in gsValue separated by sSeperateChar

### Example

**VBScript**

```vb
If bStatus Then bStatus = Ini_GetAllSections("C:\CapaInstaller.ini", "|", True, True)
If bStatus Then
  For index = LBound(gaValue) To UBound(gaValue)
    bStatus = Job_WriteLog("Custom", "Index #" & index & ": " & gaValue(index), bStatus, True)
  Next
End If   

```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[Ini_DeleteSection](/capainstaller/vb-scripting-library/ini-file-functions/ini-deletesection/) [Ini_GetAllSectionVariables](/capainstaller/vb-scripting-library/ini-file-functions/ini-getallsectionvariables/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
