C# Class Microsoft.Tools.WindowsInstaller.MockRegistry

Overrides registry hives and allows data to be imported into those hives for the current process.
The following registry hives are supported. HKEY_CLASSES_ROOT HKEY_CURRENT_USER HKEY_LOCAL_MACHINE HKEY_USERS Only a single instance of this class may be active at a time. Overriding registry hives is a per-process operation so modifying the registry key overrides may corrupt other threads.
Inheritance: IDisposable
Show file Open project: heaths/psmsi Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Restores the redirected registry hives and removes the imported values.

Private Methods

Method Description
Dispose ( bool disposing ) : void
GetRegistryHandle ( RegistryKey key ) : SafeHandle
Import ( string path, string>.Dictionary properties = null ) : void

Imports a registry XML file.

MockRegistry ( ) : System

Creates a new instance of this class and redirects supported registry hives.

RegOverridePredefKey ( IntPtr hKey, IntPtr hNewHKey ) : int

Method Details

Dispose() public method

Restores the redirected registry hives and removes the imported values.
public Dispose ( ) : void
return void