View Full Version : export registry files

07-06-2004, 04:30 PM
Does anyone know the best way to import / export registry (.reg) files? I have an application that uses the registry heavily. During install I want to import the .reg file and during uninstall I want to delete the keys that the import creates. It can use the command line prompt if need be but if there is a way to do this in Installshield X. that would help me tremendously.

Please advise.


07-06-2004, 04:40 PM
All of the InstallShield X project types let you import a .reg file at build time or design time; what type of project are you using?

07-06-2004, 05:01 PM
I'm using the Universal Installer Project currently.

I realize that Installshield has actions that allow you to import but I was wondering if there is any way that it lets you export .reg files.

Is there a premade wizard action that helps to export registry files out to the file system? I wasn't sure if the "Windows Get Registry Value Action" does this for me or not. If so, how do I get it to export out to as a .reg file? Any help on this is greatly appreciated.


07-06-2004, 05:23 PM
No, the Windows Get Registry Value action won't export a .reg file; I believe regedit.exe supports a /e command-line switch for exporting keys to a file (something like regedit /e C:\filename.reg HKEY_SOMETHING\SomeKey), which you can presumably launch with an Execute Process action.

07-06-2004, 06:02 PM
Thanks Robert for helping me out here.

I knew about the command for exporting a .reg file, like you mentioned. But in looking at the Execute Process action, I'm not sure which property would be most relevant for this issue.

I'm guessing that under the "arguments" field, I am to specify this command? (regedit /e C:\filename.reg HKEY_SOMETHING\SomeKey). I'm still not quite clear how Installshield runs these commands from the command line prompt...

07-06-2004, 06:54 PM
I expect the command would be something like $D(lib)\regedit.exe, and the other parts (/e, filename.reg, and the key name) would be the arguments... Please see the help library page for the Execute Process action for details.