# CMS_DefineEndUserCancellation

> Defines end user cancellation.

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

### Description

Defines end user cancellation.  
iMax defines maximum number of times the end user can cancel the job  
iTimeOut defines the expiration date. Date format is YYYYMMDD  
sMode defines the behaviour of End User cancellation. Then value can be:  
· IF USER LOGGED ON: If an end user has been logged on to the computer the end user cancellation message will be displayed.  
· ALWAYS: The end user cancellation message will always be displayed.  
· NEVER: End user cancellation is deactivated

### Syntax

CMS_DefineEndUserCancellation(iMax, iTimeOut, sMode) as Boolean

### Parameters

#### iMax (Integer)

Maximum number of cancellations

#### iTimeOut (Integer)

End user cancellation date

#### sMode (String)

End User cancellation mode (see description)

### Example

**VBScript**

```vb
If bStatus Then bStatus = CMS_DefineEndUserCancellation(10, 20010621, "IF USER LOGGED ON")

```

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

### Related functions

[CMS_JobRetryLater](/capainstaller/vb-scripting-library/cms-functions/cms-jobretrylater/) [Job_InstallationStart](/capainstaller/vb-scripting-library/job-functions/job-installationstart/) [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/)
