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

Save and restore of current Default Root


3 replies to this topic

RayKode

RayKode
  • Full Members
  • 58 posts

Posted 29 July 2005 - 16:05

Moring everyone,

Here's the deal .......

I need to insert some code into a rather large custom action that uses InstallScript.

At the point in the installation program I am unsure of what registry hive has been set to be the default root.

I would like to .......

Save the current vale that was set by the last RegDBSetDeafultRoot command.

Execute "my" RegDBSetDefaultRoot command.
Make my registry changes.

Then restore the Default Root from the "saved" value so it has the same vale as it did before my code executed.

Is there a way to determine the current Default Root, save it and then restore it ?

Thanks in advance for any help.

Edited by RayKode, 29 July 2005 - 16:08.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 29 July 2005 - 16:21

RegDBGetDefaultRoot only works with (pure) InstallScipt projects. Therefore (and in general) its best to set the default root whenever you need to access the registry in your script.

RayKode

RayKode
  • Full Members
  • 58 posts

Posted 29 July 2005 - 16:34

Thank you kind sir.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 29 July 2005 - 16:37

and I believe that InstallShield's "behind the scenes" default script does this as well where necessary, so you don't need to care about this.