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

condition problems


2 replies to this topic

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 05 February 2008 - 20:44

I've got a condition on a custom action that's not working how I think it should and hoped to enlist some suggestions here.

Here's my condition:

CODE
VersionNT=502 AND REMOVE<>"ALL" AND IISMAJORVERSION_REG>=6


I get the value for IISMAJORVERSION_REG from a System Search reading the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp | MajorVersion

Here's the appropriate lines from the log file:
CODE
MSI (s) (90:F4) [14:01:20:984]: PROPERTY CHANGE: Modifying IISMAJORVERSION_REG property. Its current value is '0'. Its new value: '#6'.
MSI (s) (90:F4) [14:01:20:984]: PROPERTY CHANGE: Adding REMOVE property. Its value is 'SAP,SAP_Pre_47,SAP_47_Plus'.


and the from the property dump at the end of the log file
CODE
Property(S): VersionNT = 502
Property(S): IISMAJORVERSION_REG = #6
Property(S): REMOVE = SAP,SAP_Pre_47,SAP_47_Plus



The thing that I'm guessing is the problem is that the value for IISMAJORVERSION_REG has a number sign in front of it. What does that mean and how do I deal with it?

Thanks!

-- spdygnlz --

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 06 February 2008 - 13:22

IIRC, the hash sign means that it's stored in the registry as a REG_DWORD type. I have no idea (without testing) how WI's condition evaluator deals with that but my suspicion is that it's converted to a string. Thus, your condition should be changed to test for "#6", as in:

VersionNT=502 AND REMOVE<>"ALL" AND IISMAJORVERSION_REG>="#6"

Don't quote me, though (sorry, couldn't resist...)

Edited by VBScab, 07 February 2008 - 10:01.

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 06 February 2008 - 18:35

I made a quick little project to test this out and it seems to work. Thanks!

-- spdygnlz --