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

Problems comparing registry Entry.


3 replies to this topic

technojewel

technojewel
  • Members
  • 17 posts

Posted 07 February 2006 - 10:47

I am creating a condition to check a registry value related to windows media player. I am storing the value in a property MEDIAPLAYERVERSION.

I need to check if the value stored in this property is greater than 9 or not. But, the problem is that the value for the registry is 10,0,0,3802 which is different from what I expected it to be i.e. 10.0.0.3802.

Since, there are commas (,) instead of periods (.) in the registry value my condition is not working properly. Can anyone suggest me how to check the value of these kind of registry values.

Thanks in advance.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 February 2006 - 18:59

Windows Installer can only do (alphabetic) string comparison, no version number comparison. So it would see 9.1 as being greater than 10.0. This means you need to add a custom action to do the comparison (and store the result in a property)

technojewel

technojewel
  • Members
  • 17 posts

Posted 07 February 2006 - 19:06

I m using Installshield 11.5 Pro and my project type is basic MSI type.

I am a novice regarding installshield. I know how to add custom actions but I have only ran custom made exes using the custom action. Can you please help me about how to compare version with custom action and use it as aproperty.

This is really urgent.

Thanks a lot for ur suggestion.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 February 2006 - 19:16

You could write a DLL or a script (VBScript for instance unless your users have Norton anti-virus which sometimes blockes VBScripts).
To get started with the DLL see this sample:
http://codeproject.c...ustomaction.asp