# Sys_ClearEventlog

> This function clears the specified part of the eventlog.

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

### Description

This function clears the specified part of the eventlog

### Syntax

Sys_ClearEventlog(sType, bCreateBackup) As Boolean

### Parameters

#### sType (String)

Type of Event. Can be Application, System or Security

#### bCreateBackup (Boolean)

Create a backup. Backup will be placed in `%WinDir%\System32\EventlogBackup\<TYPE>_<DATE>.evt`

### Example

**VBScript**

```vb
If bStatus Then bStatus = Sys_ClearEventlog("Application", False)
If bStatus Then bStatus = Sys_ClearEventlog("Security", True)
If bStatus Then bStatus = Sys_ClearEventlog("System", False)
```

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

### Related functions

[Sys_WaitForProcess](/capainstaller/vb-scripting-library/system-functions/sys-waitforprocess/) [Sys_Sleep](/capainstaller/vb-scripting-library/system-functions/sys-sleep/) [Sys_KillProcess](/capainstaller/vb-scripting-library/system-functions/sys-killprocess/) [Sys_GetProcessOwner](/capainstaller/vb-scripting-library/system-functions/sys-getprocessowner/) [Sys_CompareProcessOwner](/capainstaller/vb-scripting-library/system-functions/sys-compareprocessowner/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
