Regset syntax not working

A task to change the start page of Internet Explorer via registry is not working using the below script. The action says completed but the change was not applied on the targeted machine’s registry.

regset “[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]” “Start Page”=“http://www.google.com

Tried to use the ‘Windows Registry Wizard’, but it also does not work.

action uses wow64 redirection false

delete __createfile
delete wizardedit.reg

createfile until @end_create_reg_file
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
“Start Page”=“res://iesetup.dll/HardAdmin.htm”
@end_create_reg_file

move __createfile wizardedit.reg
waithidden regedit /s “wizardedit.reg”

Which user do you want to set to?
BigFix Agent runs as local system account. “user key of logged on user” instead of HKEY_CURRENT_USER may help.

1 Like

@akira is correct, “HKCU” doesn’t have a meaning outside of a logged-on user session; and with multiple users logged on, they all have separate “HKCU” hives.

Additionally, because BigFix is a 32-bit client, I’m not sure how you’d address HKCU\Software vs HKCU\Software\Wow6432Node. For the HKLM\Software you can distinguish between “registry”, “native registry”, “x32 registry”, and “x64 registry”, but I’m not sure there are similar objects in User context.

You might try looking at applying these settings through Local Group Policy…

The HKU hive should respond the same way as the HKLM hive does to the x64/x32 registry commands as we ask the OS to switch based off that base inspector.

Ah I see. I don’t do much with HKCU. So what is the syntax for that with user key of logged on user?

(user key of logged on user) of native registry
?

Unlike HKLM\Software, HKCU\Software is not redirected.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa384253(v=vs.85).aspx

As in https://developer.bigfix.com/relevance/reference/logged-on-user.html, user key of logged on user returns registry key object. You can enumerate keys with expression like:
keys of key "Control Panel" of user key of logged on user

To use in RegSet, it needs to be converted to string with user key of logged on user as string.