Skip to content

Redstone Registry

Raymond Piller edited this page Jan 16, 2023 · 6 revisions

The Redstone Registry is a location in your registry where you can override some settings. There is one subkey that will populate automatically with information, the Versions Used key. Besides that, this is left for you to override the default settings.

You will want to pay special attention to Publisher, Product, and Organizational Vars. Those can be helpful for you to create overrides in your scripts that use PSRedstone. They have no direct bearing on the way the Redstone Class or any PSRedstone functions execute.

The default registry key root (RegKeyRoot) is:

  • HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone.

ℹ: This can be overwritten with RegistryKeyRoot.

Keys

These keys will define subkeys under the RegKeyRoot key. If you've overwritten your RegKeyRoot key, just adjust the root key accordingly.

Org

Organizational (Org) Vars are referring to your organization. Use the keys and values here globally across all of your Redstone scripts. These do not affect the Redstone class directly.

You may want to define org-specific settings such as the department that owns the computer. Then you may way to make script conditional changes based on those settings. You can use a GPO or a CM to apply the reg keys and values based on whatever criteria you deem necessary. You can also just opt to not use this and query the registry yourself in the script. Doesn't hurt my feelings any. However, if you already have these defined in your registry, I suggest just pointing to that key to make those settings easily available in your scripts.

The default location of this key, unless it's overwritten by RegistryKeyRootOrg, is:

  • Product Key: HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone\Org

ℹ: Subkeys are recursed. Any valued with the same name as a subkey will be overwritten and a warning will be logged.

Product

The Product keys are always subkeys of their respective Publisher. As such, there is no direct way to override the default root key of Product. However, overwriting the Publisher root key will inherently overwrite this one. This means that if you're using PSRedstone to install Google Chrome, then your key will be:

  • Product Key: HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone\Publisher\Google\Chrome

ℹ: Subkeys are recursed. Any valued with the same name as a subkey will be overwritten and a warning will be logged.

Publisher

By default, the Publisher keys are subkeys of RegistryKeyRoot. As such, changing RegistryKeyRoot will change Publisher unless you also change the Publisher Key. This means that if you're using PSRedstone to install Google Chrome, then your key will be:

  • Publisher Key: HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone\Publisher\Google

ℹ: Subkeys are not recursed.

Versions Used

The VersionsUsed key logs what version of PSRedstone was used and when: HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone\VersionsUsed.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone\VersionsUsed]
"2023.1.1.73413"="2023-01-10T00:00:00.0000000"
"2023.1.12.22299"="2023-01-12T00:00:00.0000000"
"2023.1.13.25604"="2023-01-14T13:39:30.7171814-06:00"

ℹ: The times ending in T00:00:00.0000000 were created by my PSRedstone installer script, discussed in Advanced Start.

Values

All of the values here are used to control the Redstone class in some way. Any changes here will affect the default way that the Redstone class sets up.

Any of these values can also be configured as an environment variable; doing so will negate the registry key setting. This can be useful in CI or other process-specific environments. Just as PSRedstone to the front of the value name and make it an environment variable. Specific examples of this are included below.

RegistryKeyRoot

  • Default: HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone

This overrides the main for all other keys. However, this will not change where VersionsUsed logs to.

Here's an example of moving it to a new location:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone]
"RegistryKeyRoot"="HKEY_LOCAL_MACHINE\\SOFTWARE\\MyConfig"
$env:PSRedstoneRegistryKeyRoot = "HKEY_LOCAL_MACHINE\SOFTWARE\MyConfig"

RegistryKeyRootOrg

  • Default: HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone\Org

    ℹ: Default is the RegistryKeyRoot + Org.

This value sets the registry key where the Org Vars are pulled from.

Here's an example of moving it to a new location:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone]
"RegistryKeyRootOrg"="HKEY_LOCAL_MACHINE\\SOFTWARE\\MyOrg"
$env:PSRedstoneRegistryKeyRootOrg = "HKEY_LOCAL_MACHINE\SOFTWARE\MyOrg"

RegistryKeyRootPublisher

  • Default: HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone\Publisher

    ℹ: Default is the RegistryKeyRoot + Publisher.

This value sets the registry key where the Publisher Vars are pulled from. Inherently, this will also affect where the Product Vars are pulled from.

This means that if you're using PSRedstone to install Google Chrome, then your keys will be:

  • Publisher Key: HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone\Publisher\Google
  • Product Key: HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone\Publisher\Google\Chrome

Here's an example of moving it to a new location:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\VertigoRay\PSRedstone]
"RegistryKeyRootPublisher"="HKEY_LOCAL_MACHINE\\SOFTWARE\\MyPublishers"
$env:PSRedstoneRegistryKeyRootPublisher = "HKEY_LOCAL_MACHINE\SOFTWARE\MyPublishers"

This means that if you're using PSRedstone to install Google Chrome, then your keys will be:

  • Publisher Key: HKEY_LOCAL_MACHINE\SOFTWARE\MyPublishers\Google
  • Product Key: HKEY_LOCAL_MACHINE\SOFTWARE\MyPublishers\Google\Chrome
Clone this wiki locally