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

property value in registry


4 replies to this topic

DeusApprime

DeusApprime
  • Members
  • 73 posts

Posted 19 November 2001 - 17:53

Hi, I have a problem creating a registry value that holds a property value:

I've created a dialog that asks the user for some data. The property that is associated with the edit box is called, for example, ABC. This property also has a default value that I give it in the property table when I author the setup project.

I want to create a reg value under software\myCompany\myProduct:
myKey = [ABC]

The weird thing is that no matter what value I give ABC in the dialog, it always appears in the registry with the default value that I gave it when authoring the project. Why is that? I have a feeling that the Execute sequence re-initializes all properties. If this is true, how can I avoid it?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 November 2001 - 21:03

If your property is in all upper case ABC this should work. If it includes lower case characters Abc the value will not be carried over to the execute sequence.

houdeveloper18

houdeveloper18
  • Members
  • 13 posts

Posted 14 January 2002 - 23:28

Stefan/DeusApprime,
do you know if I.S currently records the installation date (the date when the package got installed in the target system) anywhere in the registry for developers to access later during the run time?
Thanks

Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 15 January 2002 - 09:56

Your application can make use of the Msi functions to find out about an installed product.  eg. I use MsiLocateComponent to find the location of installed files (Much better than an app path)..

In your case you will probably want to make use of

MsiGetProductInfo(
 YourProductCode,
 INSTALLPROPERTY_INSTALLDATE,
 Buffer,
 &BufferSize);

You can use other Msi functions to get your product code if you do not want to hardwire it..  MsiGetProductCode will get it from a component.  I think this is better beacuse the product code will change overtime but you can choose a unique component to the product that will never change its code.



JeffPClark

JeffPClark
  • Members
  • 9 posts

Posted 01 February 2002 - 21:04

Get the Registry Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ProductCode}
Then read the value: InstallDate