# $cs.Reg_SetInteger

> Writes a 32-bit REG_DWORD registry value. Equivalent to $cs.Reg_SetDword — this is a pure alias with identical behavior.

Source: https://docs.capaone.com/capainstaller/powerpacks/cs-reg-setinteger/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Writes a 32-bit `REG_DWORD` registry value. Equivalent to `$cs.Reg_SetDword` — this is a pure alias with identical behavior. The key is created automatically if it doesn't exist yet.

### Syntax

$cs.Reg_SetInteger(string registryroot, string regkey, string regvaluename, int regvaluedata)

### Parameters

#### registryroot (String)

Root hive: `HKLM`/`HKEY_LOCAL_MACHINE`, `HKCU`/`HKEY_CURRENT_USER`, or `HKU`/`HKEY_USERS`.

#### regkey (String)

Registry key path, relative to `registryroot`. Created automatically if it doesn't exist.

#### regvaluename (String)

Name of the value to write.

#### regvaluedata (Integer)

32-bit integer to write.

### Return value

None.

### Example

**PowerShell**

```powershell
$cs.Reg_SetInteger('HKCU', 'Software\Adobe\Acrobat Reader\DC\AVGeneral', 'bisFirstLaunch', 0)
```

Writing a feature-flag value during `PostInstall` — functionally identical to using `Reg_SetDword`, since `Reg_SetInteger` is a pure alias.

```powershell
$cs.Reg_SetInteger('HKLM', 'SOFTWARE\Contoso\AppSuite\Features\Reporting', 'Enabled', 1)
```

Writing a version-as-integer marker so a later install can compare against it before upgrading.

```powershell
$cs.Reg_SetInteger('HKLM', 'SOFTWARE\Contoso\AppSuite', 'BuildNumber', 4712)
$cs.Job_WriteLog("Recorded BuildNumber 4712")
```

### Related functions

[$cs.Reg_SetDword](/capainstaller/powerpacks/cs-reg-setdword/) [$cs.Reg_SetQword](/capainstaller/powerpacks/cs-reg-setqword/) [$cs.Reg_GetInteger](/capainstaller/powerpacks/cs-reg-getinteger/)
