Modifying a REG_DWORD under HKEY_USERS

I have a task with the following in the Action script and it fails every time I run it:

regset "[user key of current user\Software\Microsoft\Office\Outlook\Addins\PhishMeOutlookReporter.AddinModule]" "LoadBehavior"=00000003

The relevance I have in it works fine:

exists values "LoadBehavior" whose (it as string = "2") of keys "Software\Microsoft\Office\Outlook\Addins\PhishMeOutlookReporter.AddinModule" of (current user keys (logged on users) of registry)

Any tips would be appreciated.

I have also tried this, which also fails:

parameter "sid" = "{component string of sid of security account ("Corporate\" & name of current user)}"

regset "[HKEY_USERS\{parameter "sid"}\Software\Microsoft\Office\Outlook\Addins\PhishMeOutlookReporter.AddinModule]" "LoadBehavior"=dword:00000003

Not sure if it’s your only problem, but you’d at least need to use curly brackets to invoke the Relevance substitution…else it’s looking for the literal-string reg key “[user key of current user\Software\Microsoft.…”
like

regset “[{user key of current user}\Software\Microsoft\Office\Outlook\Addins\PhishMeOutlookReporter.AddinModule]” “LoadBehavior”=00000003

On this one, I think you’re just missing a backslash after HKEY_USERS. As written it evaluates as
regset “[HKEY_USERSS-1-5-21-xxxxx\Software.…”

2 Likes

Thank you Jason! Adding the curly brackets to invoke the Relevance did the trick. I also added to the end =dword:0000003

Thanks!

FYI, it is generally better to affect HKCU through use of Local GPO so that it can affect all users even if no user is currently logged in.

Examples: