*****************************************************************
***                REGEDIT4 NSIS plugin v1.0                  ***
*****************************************************************

2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)


Features:
-Export key contents to the file in REGEDIT4 format
-Import key contents from the file to the registry


**** Output variables ****
.r0-.r9 == $0-$9
.R0-.R9 == $R0-$R9


**** Registry Export (save to the file) ****
regedit4::SaveKey "[fullpath]" "[file]" "[Options]" .r0

"[fullpath]"  - Registry path (Root\SubKey)

	Root:
	HKEY_CLASSES_ROOT HKCR
	HKEY_CURRENT_USER HKCU
	HKEY_LOCAL_MACHINE HKLM
	HKEY_USERS HKU
	HKEY_PERFORMANCE_DATA HKPD
	HKEY_CURRENT_CONFIG HKCC
	HKEY_DYN_DATA HKDD

"[file]"      -Export to this file

"[Options]"   - "/D=[0|1|2] /G=[1|0] /B=[0|1]"

	/D=[0|1|2]
	/D=0  - Don't delete any keys (default)
	/D=1  - Delete only root key before restoring
	/D=2  - Delete keys before restoring

	/G=[1|0]
	/G=1  - Search with subkeys (default)
	/G=0  - Don't search subkeys

	/B=[0|1]
	/B=0  - Don't show searching path (default)
	/B=1  - Show in the details current searching path

.r0  - $0=errorlevel:
	 0 - success
	-1 - error


**** Registry Import (restore from the file) ****
regedit4::RestoreKey "[file]" .r0

.r0  - $0=errorlevel:
	 0 - success
	-1 - error

Note:
regedit4::RestoreKey simply exec regedit:  regedit /s "[file]"