You are here

Reg Import And Export

4 posts / 0 new
Last post
David Dixon II
David Dixon II's picture
Offline
Last seen: 2 years 10 months ago
Developer
Joined: 2007-06-11 22:54
Reg Import And Export

What Is The Codes For Importing And Exporting Reg Keys From And To A Folder On The Desktop?

Im Sorry I Keep Asking For Codes But I Look And Look With No Solution. ERRRRRRRRRRRRRRRRRRR

TY For Helping.

And The PortableApps Template Is Confusing Also. So Yea

digitxp
digitxp's picture
Offline
Last seen: 13 years 3 months ago
Joined: 2007-11-03 18:33
Check out

the registry plugin at:
http://nsis.sourceforge.net/Registry_plug-in
Just check out the 7-zip portable launcher.

From the readme:
**** Registry Export (save to the file in REGEDIT4 format) ****

${registry::SaveKey} "[fullpath]" "[file]" "[Options]" $var

"[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]" - "/A=[0|1] /D=[0|1|2] /G=[1|0] /B=[0|1]"

/A=[0|1]
/A=0 - Always create new file (default)
/A=1 - Append data if file exists and
create new file if not

/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

$var 0 - success
-1 - error

Also from the readme:

**** Registry Import (restore from the file) ****

${registry::RestoreKey} "[file]" $var

$var 0 - success
-1 - error

Note:
${registry::RestoreKey} simply exec regedit: regedit /s "[file]"

Insert original signature here with Greasemonkey Script.

wraithdu
Offline
Last seen: 11 years 6 months ago
Developer
Joined: 2007-06-27 20:22
Better then

Better then ${registry::RestoreKey} is to use

ExecWait('regedit /s "regfile.reg"')

Because it will wait for the registry import to finish before continuing on in the script. ${registry::RestoreKey} does not wait for the function to finish (this was an issue I discussed with the Registry plugin developer a while back).

John Bentley
John Bentley's picture
Offline
Last seen: 15 years 4 months ago
Developer
Joined: 2006-01-24 13:26
That doesn't work on vista

That doesn't work on vista without admin privs.

cowsay Moo
cowthink 'Dude, why are you staring at me.'

Log in or register to post comments