Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Export .reg file


4 replies to this topic

jramsland

jramsland
  • Members
  • 10 posts

Posted 13 November 2001 - 23:25

I need to be able to export a .reg file from the target system and then import it into another spot in the same registry.  Is there a way via the command line I could do such a thing?  Does InstallShield somehow allow me to do this?  Any help is appreciated.

Thanks in advance,
Justin O. Ramsland


lasenbby

lasenbby
  • Members
  • 744 posts

Posted 14 November 2001 - 17:54

You should search this site for undocumented functionality of regedit that allows you to export a reg file.  You would then have to find the key to be changed in the file, modify it and then save it.  Then you would have to import it.

However, an easier way might be to use this utility:
http://www.installsi...les/copykey.zip


ObjectCentric

ObjectCentric
  • Members
  • 34 posts

Posted 16 November 2001 - 20:10

You can do this programmatically with InstallShield with little trouble if any at all. I do it in mine a few times during upgrade paths. I would advise against using third party products during an installation because you cannot rely on undocumented feautures (aka bugs) on the next product revision or service pack.

jramsland

jramsland
  • Members
  • 10 posts

Posted 16 November 2001 - 22:08

Could you give me an example on how I might do this programmatically in InstallShield?  I can't seem to find anything in the help files as far as exporting the registry.

Thanks,
Justin O Ramsland


ObjectCentric

ObjectCentric
  • Members
  • 34 posts

Posted 16 November 2001 - 22:22

Create a function that will call back the data on the fly, or load into a list...

Change the default root to where you key is set (RegDBSetDefaultRoot)
Check if your key exists (RegDBKeyExist)
Get the key value(RegDBGetKeyValueEx)
Loop until your key and its values are fully enumerated...

... load this into the a list, or call on the fly..

Delete the old key and values (RegDBDeleteKey )
Check if your target exists (RegDBKeyExist)
Empty the list or the returned data into your target (RegDBSetKeyValueEx )
..
You can also create a file with your dump for an actual .REG file type by creating the first line with "Windows Registry Editor Version 5.00" or whatever compatible version... etc.
...
Destroy your list (if used)