Public Attributes | List of all members
Wix::Extensions::SystemTools::RegistryKeyCopy Class Reference

Public Attributes

string Id
 
RegistryKeyType TargetRoot
 
string TargetPath
 
YesNoType CheckIfExists
 
YesNoType Overwrite
 
YesNoType CopyOnInstall
 
YesNoType CopyOnUnInstall
 
YesNoType RemoveSource
 
YesNoType RestoreOnRollback
 

Detailed Description

May be nested under RegistryKey. Defines a registry key copy and restore operation that can be scheduled across a major upgrade.

Example:

The following example will backup the HKEY_LOCAL_MACHINE\Software\AppSecInc\SystemToolsMsi key before it's written by the installer and roll back the change if installation fails.

<Component Id="RegistryBackupComponent" Guid="A9A913DB-CDA9-486c-B4C6-2A109661AEBD">
<RegistryKey Id="RegistryKeyToBackup" Action="create" Root="HKLM" Key="SOFTWARE\AppSecInc\SystemToolsMsi">
<RegistryValue Id="RegistryKeyToBackupProductCode" Name="ProductCode" Value="[ProductCode]" Action="write" Type="string" />
<AppSecInc:RegistryKeyCopy Id="RegistryKeyBackupCopy" TargetRoot="HKEY_LOCAL_MACHINE" TargetPath="SOFTWARE\AppSecInc\SystemToolsMsiBackup"
</RegistryKey>
</Component>

Note that Windows Installer already performs the restore operation, but it is not designed to work across a major upgrade. The default scheduling of this extension simply enables registry key backup. In order to perform a backup and rollback in a major upgrade scneario you must schedule the backup custom action before a previous version of the product is uninstalled.

<Custom Action="Win32_RegistryCopy_Deferred_Install" Before="RemoveExistingProducts">UpgradingCondition</Custom>

The extension will now backup the registry key before uninstall happens, then restore it on rollback of the major upgrade in an event of failure.

Member Data Documentation

YesNoType Wix::Extensions::SystemTools::RegistryKeyCopy::CheckIfExists

Check whether the source registry key exists before performing a copy operation.

YesNoType Wix::Extensions::SystemTools::RegistryKeyCopy::CopyOnInstall

Copy registry key at install time.

YesNoType Wix::Extensions::SystemTools::RegistryKeyCopy::CopyOnUnInstall

Copy registry key at uninstall time.

string Wix::Extensions::SystemTools::RegistryKeyCopy::Id

Identifier for the registry key copy (primary key).

YesNoType Wix::Extensions::SystemTools::RegistryKeyCopy::Overwrite

Overwrite target key if it exists.

YesNoType Wix::Extensions::SystemTools::RegistryKeyCopy::RemoveSource

Remove the source registry key after copy (ie. move).

YesNoType Wix::Extensions::SystemTools::RegistryKeyCopy::RestoreOnRollback

Restore registry key contents on rollback.

string Wix::Extensions::SystemTools::RegistryKeyCopy::TargetPath

Target registry key path.

RegistryKeyType Wix::Extensions::SystemTools::RegistryKeyCopy::TargetRoot

Target registry root.


The documentation for this class was generated from the following file:


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com