This script interrogates the registry to determine if the user-defined subkey exists. If the key does not exist, it will be created.
$PSParentPath = "HKLM:\SOFTWARE\Wow6432Node"
$PSChildName = "OneZeroOne"
It will then create or update values according to a user-defined array containing lists of value names, values, and types:
$RegVals = @(
("InstallationDirectory","C:\Program Files\One Zero One\","SZ"),
("Version","1.0.1","SZ"),
("LastUpdateCheck","60240c70","DWORD")
)
Obtain this script by cloning or downloading from GitHub where it is licensed under the GPL 2.0.
Relevant Links
- Structure of the Registry – Win32 apps | Microsoft Docs
- Registry Value Types – Win32 apps | Microsoft Docs
- Share: