Sign in to follow this  
Followers 0
MicahC

How can I export registry keys?

9 posts in this topic

I am looking for a way to export a registry key to a reg file. The file type really doesn't matter too much just as long as I can read it and email it. Is what im trying to accomplish possible?

Micah C

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I am looking for a way to export a registry key to a reg file. The file type really doesn't matter too much just as long as I can read it and email it. Is what im trying to accomplish possible?

Micah C

ShellExecuteWait("regedit.exe","/e 2.reg HKEY_CURRENT_USER\Software\PopCap",@ScriptDir & "\")

This example will export "HKEY_CURRENT_USER\Software\PopCap" to a file named "2.reg" to the same folder you are running the script from.just change "HKEY_CURRENT_USER\Software\PopCap" to what you want and you can change "@ScriptDir & "\" to where you want .And of course you can name it something besides 2.reg as well.

Edited by froufrou

Share this post


Link to post
Share on other sites

Perfect! This does the trick. I really appreciate your help on this.

Share this post


Link to post
Share on other sites

No prob! :D:D

Share this post


Link to post
Share on other sites

Just another quick question came to mind. Its probrally documented somewhere, but for the sake of time I will ask here. If I want to attache all files in a directory with the *.reg extension how would I go about doing that? Any help is greatly appreciated.

ORIGINAL Attachment script:

$s_AttachFiles = "" ; the file you want to attach- leave blank if not needed

What im thinking... but its not working!

$s_AttachFiles = "*.reg" ; the file you want to attach- leave blank if not needed

Share this post


Link to post
Share on other sites

Anyone? If you need more details or information I'm willing explain it more.

Share this post


Link to post
Share on other sites

Are you crazy ? Read the documentation, what do you mean "for the sake of time"

And don't bump after just an hour !!!

If you just want to append one file to the other you can read the help file for file operations. Or in one batch command :

copy destination.reg firstfile.reg+secondfile.reg+thirdfile.reg

Share this post


Link to post
Share on other sites

Sorry about the bump only after an hour. My bad, I should have done research on my own. I am having troubles copying a reg key. I want to copy:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676

The whole key. For some reason

ShellExecuteWait("regedit.exe","/e Outlook.reg HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676 ",@ScriptDir & "\")

Is not working when attempting to export the key. Any help is appreciated.

Share this post


Link to post
Share on other sites

Does anyone know why I can't copy this key?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0