IRegistryComponent
This component gives access to registry keys, imports files and also creates keys and values with the specified path.
Declaration
IRegistryComponent : IDispatch
Properties
IRegistryKey CurrentUserOrLocalMachine - Gets the custom registry hive for current user or local machine.
IRegistryKey HKClassesRoot - Gets the registry hive for classes root.
IRegistryKey HKCurrentUser - Gets the registry hive for current user.
IRegistryKey HKLocalMachine - Gets the registry hive for local machine.
IRegistryKey HKUsers - Gets the registry hive for user.
IRegistryKey HKCurrentConfig - Gets the registry hive for current config.
Methods
$a = New-Object -comobject AdvancedInstaller $b = $a.CreateProject() $b.RegistryComponent.CurrentUserOrLocalMachine.Keys
FindKeyByPath(String path)- returns IRegistryKey
This method searches at the specified path and
the key is returned if found.
FindKeyByName(String name)- returns Array<IRegistryKey>
This method searches for all the keys with
the specified name and returns an array containing all the matching keys.
$b.RegistryComponent.FindKeyByName("[ProductName]")
CreateKeyByPath(String path) - returns IRegistryKey
This method creates a new key at the specified
path.
ImportRegistryFile(String path, Bool
is64Bit)
This method imports a registry file from disk.
CreateValueStringPrependByPath(String path, String data =
“ ”)- returns IRegistryValue
This method creates a new value at the
specified path. The data can be specified or the default value is added.
The data will be prepended.
CreateValueStringAppendByPath(String path, String data =
“ ”) - returns IRegistryValue
This method creates a new value at the
specified path. The data can be specified or the default value is added.
The data will be appended.
CreateValueStringReplaceByPath(String path, String data =
“ ”)- returns IRegistryValue
This method creates a new value at the
specified path. The data can be specified or the default value is added.
The data will be replaced.
CreateValueExpandableStringByPath(String path, String data
= “ ”)- returns IRegistryValue
This method creates a new value at the
specified path. The data can be specified or the default value is
added.
CreateValueIntegerByPath(String path, String data)-
returns IRegistryValue
This method creates a new value at the
specified path. The data has to be specified, there is no default value.
CreateValueBinaryByPath(String path, String data =
“ ”)- returns IRegistryValue
This method creates a new value at the
specified path. The data can be specified or the default value is
added.
Topics
- IRegistryKey
Registry Key interface - IRegistryValue
Registry Value interface