cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sureshkottakki
Level 6

Compare .Net Framework version in InstallScript MSI projects

Hi,
We have created Installscript MSI projects, we need to check .Net Framework 4.5 or later is installed or not. We are readying the version value from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Version , but not able to compare with = or >= because of the decimal value. Can you please suggest how to compare version value. Even I tried with few build-in functions like VerCompare, but not able to do because .net Framework version value does not have all four components, e.g. 1.2.3.4
Please suggest me how to compare the .Net Framework version through installscript.

Thanks in advance
Labels (1)
0 Kudos
(5) Replies
rguggisberg
Level 13

Instead of doing that, can you just go to 'Application Data' - 'Redistributables', scroll down and and check the appropriate prerequisite?
0 Kudos
sureshkottakki
Level 6

Hi rguggisberg,

In our project we need to do a minimum check for .Net Framework 4.5, the setup needs to check for the version(if framework 4.5 or greater is installed then the setup execution will continue otherwise it will get abort)
If we use the 'Redistributables' we can check that particular version I guess, but we want to allow if .Net Framework 4.5 or later is installed.

Thanks in advance
0 Kudos
sureshkottakki
Level 6

Any update on this please?
0 Kudos
rguggisberg
Level 13

Try something like this:
Go to Installation Information tab, General Information. And set this as a Condition
DOTNETVERSION45FULL>="#1"

Then add a text string for
IDPROP_EXPRESS_LAUNCH_CONDITION_DOTNETVERSION45FULL
Microsoft .NET Framework 4.5 Full package or greater needs to be installed for this installation to continue.
0 Kudos
sureshkottakki
Level 6

Hi rguggisberg,

Using system search I read the value and put it in DOTNETVERSION45FULL and check the condition as you mentioned, but not able to do so.
Actually we want to compare the version using installscript if no other option is there to do this, can you please suggest if there is any way to do this. In future if Microsoft launches .Net framework 5.x also we need to consider

Thanks in advance
0 Kudos