PackageDeployment Module Help

Package Deployment Module

Read-RegistryValue Cmdlet

Version 3.1.0.0

Read-RegistryValue

Synopsis

Get Variable from Registry

Syntax

Read-RegistryValue [-KeyPath] <String> [[-ValueName] <String>] [-ValueVariable] <String> [-ContinueOnError] [-Wow64] [[-Context] <String>] [<CommonParameters>]

Description

Use this command to read information from the registry.
In this command's dialog box you must specify the key and the value you want to read from the registry.
The value read from the registry will be stored in a user-defined, local variable and is valid for the complete installation package and for all other installation packages called by this specific installation package as well as all component packages of the installation package.
In case an error occurs when running this command, you can specify the option Stop script on error in the Script Editor. If the error actually occurs, the script stops, thus preventing subsequent errors, and the associated policy is shown as not compliant.
This also applies if you set the package property Error handling to Always terminate script on error (a default setting for new packages).

Parameters

-Context <String>

User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user.
UserPerService: User-related command, execution in Service context.
Computer: Execution under user account; logging in HKEY_CURRENT_MACHINE, i.e. for the computer.
ComputerPerService: Execution in service context; logging in HKEY_LOCAL_MACHINE, i.e. for the computer.

Required

False

Position

3

Accepts pipeline input

False

-ContinueOnError <SwitchParameter>

Continues script execution in spite of errors in the respective command

Required

False

Position

Named

Accepts pipeline input

False

-KeyPath <String>

Specify the registry key you want to read from.

Required

True

Position

0

Accepts pipeline input

False

-ValueName <String>

Either the default value of the key or the name of a different value. If this is present on the workstation, it can be selected.

Required

False

Position

1

Accepts pipeline input

False

-ValueVariable <String>

Enter the name of the variable omitting the % sign.

Required

True

Position

2

Accepts pipeline input

False

-Wow64 <SwitchParameter>

Use WOW64 on x64 computers.

Required

False

Position

Named

Accepts pipeline input

False

<CommonParameters>

For more information about common parameters, type "Get-Help about_CommonParameters".