# Reg_CreateKey

> Creates specified sub key in Registry.

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

### Description

Creates specified sub key in Registry.

### Syntax

Reg_CreateKey(sHandle, sKey) as Boolean

### Parameters

#### sHandle (String)

HKEY-handle

#### sKey (String)

Subkey to create

### Example

**VBScript**

```vb
If bStatus Then bStatus = Reg_CreateKey("HKLM", "Software\KeyName")

```

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

### Related functions

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