REGSET not setting key in x32 Registry

I am trying to set a reg key in the x32 registry using the follow code:

regset “[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DISABLE_IE11_SECURITY_EOL_NOTIFICATION]” “iexplore.exe”=dword:0000001

Just to add to this I am also doing this to the x64 registry using the follow logic:

// For 32Bit
if {not x64 of operating system}
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DISABLE_IE11_SECURITY_EOL_NOTIFICATION]” “iexplore.exe”=dword:0000001
endif

// For 64Bit
if {x64 of operating system}
regset “[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DISABLE_IE11_SECURITY_EOL_NOTIFICATION]” “iexplore.exe”=dword:0000001
endif

The X64 key is set, the x32 doersn’t even know the debugger, and console, report success.

Any ideas?

Use the following actionscript:

regset "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DISABLE_IE11_SECURITY_EOL_NOTIFICATION]" "iexplore.exe"=dword:0000001

This will set the 32bit registry location on both 32bit and 64bit machines.

You don’t need those IF-THEN statements.

You use regset64 to set values in the 64bit registry.

I just tried this and it didn’t work in the 32bit.

For things like this, it really helps to know the exact path in RegEdit where you want the values to be set on a 32bit system and where on a 64bit system, then I can work from there to define the right actionscript to use.

I’m going to need a lot more information to understand this.

32bit windows or 64bit windows?

What is the registry location it set the value in?

On a 32bit windows system it should have set it in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DISABLE_IE11_SECURITY_EOL_NOTIFICATION

On a 64bit windows system it should have set it in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DISABLE_IE11_SECURITY_EOL_NOTIFICATION

To have it be set in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DISABLE_IE11_SECURITY_EOL_NOTIFICATION on a 64 bit system (which is the 64 bit registry) then you must use regset64


If you want a registry value to be set in the 32bit registry on a 32bit system, and the 64bit registry on a 64 bit system, then use regset64

If you want a registry value to be set in the 32bit registry on both, then use regset instead.

Note:

I think there may be some confusion of terms:

  • this is the 32bit registry on a 64bit system: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
  • this is the 64bit registry on a 64bit system: HKEY_LOCAL_MACHINE\SOFTWARE
  • this is the 32bit registry on a 32bit system: HKEY_LOCAL_MACHINE\SOFTWARE

To add to the confusion, when a 32bit app on a 64bit system reads from the registry, it attempts to read HKEY_LOCAL_MACHINE\SOFTWARE but it silently gets redirected to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node … this means when you ask a 32bit app where it stores it’s registry values, it will tell you they are here: HKEY_LOCAL_MACHINE\SOFTWARE when they are actually stored here: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node

Thanks Microsoft.

1 Like

I have some of these commands in a task and it completes successfully but does not set or create the keys/value.

Completed regset64 “[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{{4d36e972-e325-11ce-bfc1-08002be10318}\0001]” “abftest"=dword:00000100
Completed regset64 “[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{{4d36e972-e325-11ce-bfc1-08002be10318}\0001]” “PNPCapabilities"=dword:00000100
Completed createfile until end-reg-edit-commands
Completed REGEDIT4
Completed [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{{4d36e972-e325-11ce-bfc1-08002be10318}\0001] “PNPCapabilities"=dword:00000100
Completed [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{{4d36e972-e325-11ce-bfc1-08002be10318}\0002] “PNPCapabilities"=dword:00000100
Completed [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{{4d36e972-e325-11ce-bfc1-08002be10318}\0000] “PNPCapabilities"=dword:00000100
Completed [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{{4d36e972-e325-11ce-bfc1-08002be10318}\0003] “PNPCapabilities"=dword:00000100
Completed end-reg-edit-commands
Completed move __createfile setup.reg
Completed wait regedit /s setup.reg

Not sure if it’s a typo or copy/paste problem, but you seem to be missing the backslash after Class and before the GUID.

1 Like