# CMS_SetPackageStatusToInstalled

> Will set the status of a package to Installed.

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

### Description

Will set the status of a package to Installed

### Syntax

**VBScript**

```vb
CMS_SetPackageStatusToInstalled(sPackage, sVersion) as Boolean
```

**PowerShell**

```powershell
[bool]CMS_SetPackageStatusToInstalled -package <string> -version <string>
```

### Parameters

#### sPackage (String)

Name of package

#### sVersion (String)

Version of package

### Return value

**VBScript**

Boolean, TRUE if function completed successfully.

**PowerShell**

Boolean, TRUE if function completed successfully.

### Example

**VBScript**

```vb
If bStatus Then bStatus = CMS_SetPackageStatusToInstalled("CapaInstaller", "v1.0")
```

**PowerShell**

```powershell
if (CMS_SetPackageStatusToInstalled 'Bit Rally 3.44' 'v1.0') {
   $cs.Job_WriteLog("Installed", "The status of Bit Rally 3.44 is now set to Installed")
}
```

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

### Related functions

[CMS_SetPackageStatusToNotCompliant](/capainstaller/vb-scripting-library/cms-functions/cms-setpackagestatustonotcompliant/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/) [Business Unit support](/capainstaller/vb-scripting-library/addendum/business-unit-support/)
