Registry value change and relevence

I recently encountered this issue when I went to upgrade my Win 8 laptop to Win 10 it says that I cannot install Win 10 to a usb flash drive. I looked it up and it a registry value I need to change in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control PortableOperatingSystem from “1” to “0”. I have never done this so any help will be greatly appreciated, and what would the relevance be.

if exist key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control” “PortableOperatingSystem” whose ( value “dword”=“1”) of registry
regset “[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control” ”PortableOperatingSystem” “dword”=“0” as integer

Hello! While you can certainly create custom content by hand to achieve this, have you checked out the Windows Registry Wizard in the BES Support site? It should help you to create content to modify the given registry value.

1 Like

Thanks you,for pointing me in the right direction. I will try that now.

How do i update my Windows Registry Wizard to show windows 8?

This is how you would read the actual value using relevance:

unique values of (it as string) of values "PortableOperatingSystem" of keys "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" of registries

The relevance for the Fixlet/Task to change the value would be this, given that 0 is desired:

not exists values "PortableOperatingSystem" whose(0 = it as string as integer) of keys "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" of registries

[holy thread resurrection Batman!]

Curious, why does the Windows Registry Wizard use createfile and waithidden regedit instead of the native regset command?


1 Like

:slight_smile: fair question. Two thoughts:

  1. It was created before the regset command was introduced in v8.0
  2. While it allows for setting single values, it also allows you to import a .reg file. As such, from an implementation perspective, it is easier to maintain consistency in the logic.

To be sure, the createfile and waithidden approach is not creating an issue, is it?

  1. Well that makes sense. So then why wasn’t it updated for regset when it became available?

From a holistic product point of view, the dashboard not using regset makes one wonder whether the dashboard knows something I don’t, and then question whether regset might be problematic.

From watching in procmon, it looks like the regset command just creates a reg file and then imports it with regedit. So it just shortcuts the process of building a createfile.

However it would be slightly less efficient with multiple entries - it creates a separate file for each regset command, and launches a separate regedit process for each regset command.

After wrassling with regset recently, I eventually noticed that it requires brackets surrounding the key path:
regset "[HKLM\Foo\bar]"

but the registry inspector does not:
key "HKLM\Foo\bar" of x32 registry

It took an annoying amount of time to figure out why regset wasn’t working as expected.

1 Like

Regset, under the hood, uses a .reg file, and follows the rules of .reg files.

Yes, that’s apparent. But if you don’t already know the .reg rules, it appears as simply inconsistency between the BigFix tools.

1 Like