# Reg_GetVariableType

> Gets the type of the requested variable.

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

### Description

Gets the type of the requested variable.

### Syntax

Reg_GetVariableType(sHandle, sKey, sVariable) as Boolean

### Parameters

#### sHandle (String)

HKEY-handle

#### sKey (String)

Subkey path

#### sVariable (String)

Name of variable to check type of

### Return value

Result will be stored in gsValue

Possible results are: String, Long or Integer.

Note: Returned is the type of the VALUE. Not the type of the variable itself.

### Example

**VBScript**

```vb
If bStatus Then bStatus = Reg_GetVariableType("HKLM", "Software\KeyName", "ValueName")
If bStatus Then bStatus = Job_WriteLog("Custom", "gsValue: " & gsValue, bStatus, True)
```

[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/)
