# ProgressBar_SetText

> Display a progress bar. Useful when running e.g. login scripts.

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

### Description

Display a progress bar. Useful when running e.g. login scripts.

### **Note:**

This function is not supported on Windows Vista and newer versions of Windows OS's

### Syntax

ProgressBar_SetText(sCaption, sText, iProgressBarPercent, bAlwaysOnTop) As Boolean

### Parameters

#### sCaption (String)

Caption of the form

#### sText (String)

Text to display

#### iProgressBarPercent (Integer)

Amount of percent of the progress bar (0-100)

#### bAlwaysOnTop (Boolean)

If TRUE, the progressbar will always be topmost

### Example

**VBScript**

```vb
If bStatus Then bStatus = ProgressBar_SetText("Running loginscript for ACME Inc", "Mapping M: to \\server\share..", 30, True) 
```

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

### Related functions

[ProgressBar_Unload](/capainstaller/vb-scripting-library/progressbar-functions/progressbar-unload/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
