Skip to content

$cs.Reg_SetInteger

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.

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

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

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

Name of the value to write.

32-bit integer to write.

None.

Terminal window
$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.

Terminal window
$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.

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

$cs.Reg_SetDword $cs.Reg_SetQword $cs.Reg_GetInteger