cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Amarjeet
Level 7

Searching a registry key and setting its outcome as as install condition not working.

Hi,

I am searching for following registry key in System Search.

NETFRAMEWORK452 = HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Release

This key is not present when .NET framework 4.0 is installed. But is available when .NET framework 4.5.x is installed. Value of this registry key is #379893 for .NET framework 4.5.2.

I want my installation to continue only if .NET framework 4.5.2 OR higher is installed.

I have set install condition like below :

(NETFRAMEWORK452>="#379893") And (NETFRAMEWORK452<>"")

OR

(NETFRAMEWORK452>=379893) And (NETFRAMEWORK452<>"")


When I try to install on machine where only .NET framework 4.0 is installed, my setup continues. My expectation is it should stop.

Any idea ?

Amarjeet
Labels (1)
0 Kudos
(2) Replies
ch_eng
Level 7

Amarjeet,

[LIST=1]
  • Does your NETFRAMEWORK452 property have a default value? (Under "Behavior and Logic" -> "Property Manager")
  • This logic probably won't work
    NETFRAMEWORK452>="#379893"
    because #379893 is being treated as a text string, not a number


    HTH
  • 0 Kudos
    Amarjeet
    Level 7

    Hi ch_eng

    I have not set any default value for this property. I have created another property called NETFRAMEWORKVALUE and set this property with value "#379893"

    Even if I set condition like NETFRAMEWORK452 >= NETFRAMEWORKVALUE - it does not work.

    Interestingly above condition works in Custom Actions.

    Not sure why this works in custom actions and not in install conditions.

    Regards,

    Amarjeet
    0 Kudos