Copy Registry Key: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
Line 16: Line 16:
</highlight-nsis>
</highlight-nsis>


== Examples ==
== Examles ==
Normal:
Normal:
<highlight-nsis>
<highlight-nsis>
Line 26: Line 26:
${COPY_REGISTRY_KEY} HKLM SOFTWARE\NSIS HKLM SOFTWARE\BACKUP\NSIS
${COPY_REGISTRY_KEY} HKLM SOFTWARE\NSIS HKLM SOFTWARE\BACKUP\NSIS
SectionEnd
SectionEnd
</highlight-nsis>
</highlight-nsis




Line 39: Line 39:
SectionEnd
SectionEnd
</highlight-nsis>
</highlight-nsis>


== The Function ==
== The Function ==

Revision as of 11:06, 16 June 2009

Author: Iceman_K (talk, contrib)


Description

Use this function to copy a registry key along with all its values and subkeys to another location in the registry.

Usage

Normal:

${COPY_REGISTRY_KEY} SOURCEROOTKEY SOURCESUBKEY TARGETROOTKEY TARGETSUBKEY


Uninstaller:

${UN.COPY_REGISTRY_KEY} SOURCEROOTKEY SOURCESUBKEY TARGETROOTKEY TARGETSUBKEY

Examles

Normal:

!include registry.nsh
 
!insertmacro COPY_REGISTRY_KEY
 
Section
${COPY_REGISTRY_KEY} HKLM SOFTWARE\NSIS HKLM SOFTWARE\BACKUP\NSIS
SectionEnd
</highlight-nsis
 
 
Uninstaller:
<highlight-nsis>
!include registry.nsh
 
!insertmacro UN.COPY_REGISTRY_KEY
 
Section uninstall
${UN.COPY_REGISTRY_KEY} HKLM SOFTWARE\NSIS HKLM SOFTWARE\BACKUP\NSIS
SectionEnd

The Function

CopyRegistryKey.zip (1 KB)