# MSI_SetRetryValues

> Changes the default MSI retry count and wait time. Call it before MSI_CheckEngineState() for the new values to take effect.

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

### Description

If default retry and wait values needs to be changed this is the function to call. To take effect this function needs to be called before MSI_CheckEngineState()

### Syntax

MSI_SetRetryValues(iRetryCount, iSecondsToWait) As Boolean

### Parameters

#### iRetryCount (String)

How many times should be retried

#### iSecondsToWait (String)

How long to wait each time

### Example

**VBScript**

```vb
If bStatus Then bStatus = MSI_SetRetryValues(45, 90)
If bStatus Then bStatus = MSI_CheckEngineState()
If bStatus And UCase(gsValue) = "TRANSACTION" Then 
  bStatus = Job_WriteLog("Custom", "MSI Engine is in transaction phase. Installation is being postponed", bStatus, True)
End If
```

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

### Related functions

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