Create/Add DWORD registry value in HKEY_CURRENT_USER\Software

Hello,
How does one create a DWORD registry value under HKEY_CURRENT_USER\Software using only action script? Is it possible with the RegSet command? If yes how?

Thank you.

In the past, I have used relevance like following to “refer” the registry of current user. I suppose similar expression will work for RegSet, but not sure if HKEY_CURRENT_USER immeidately see the changes to HKEY_USERS.

value "xxxxx" of key ("HKEY_USERS\" & ( component string of sid of current user ) & "\Software\Company\yyyyy") of native registry as integer

There is also newer inspectors that can produce the key for you

See https://developer.bigfix.com/relevance/reference/registry.html#current-user-key-logged-on-user-of-registry-registry-key and https://developer.bigfix.com/relevance/reference/registry.html#current-user-key-of-registry-registry-key

HKCU is merely a view into the HKU hive so it definitely sees the changes immediately.