# CMS_SetPackageStatusToNotCompliant

> Will set the status of the running package to 'Not Compliant'.

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

### Description

Will set the status of the running package to 'Not Compliant'.   
This function is intended to be used before the package has been downloaded and/or before the user has been prompted to allow installation of the package.

### Syntax

CMS_SetPackageStatusToNotCompliant(sPackage, sVersion) As Boolean

### Parameters

#### sPackage (String)

Package name

#### sVersion (String)

Package version

### Return value

Boolean, TRUE if function completed successfully.

### Example

The example below shows how this function could be used in a real world situation. The CompliancyCheck function could be included in the package itself or provided via CustomLib.cis and will prevent a package from running on 64 bit OS in this case.

**VBScript**

```vb
' this function will set bStatus to FALSE in order to skip the Job execution.'
Function CompliancyCheck()
  Dim bStatus : bStatus = True
  If gbx64 Then
    If bStatus Then bStatus = Job_WriteLog("CompliancyCheck", "Package is not allowed to run on 64 bit OS", bStatus, True)
    If bStatus Then bStatus = CMS_SetPackageStatusToNotCompliant("CapaInstaller", "v1.0")
  End If
  CompliancyCheck = bStatus
End Function
```

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

### Related functions

[CMS_SetPackageStatusToInstalled](/capainstaller/vb-scripting-library/cms-functions/cms-setpackagestatustoinstalled/) [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/)
