InstallAware Script- .NET Framework version comparison getting failed

  .net-framework-version, installaware, version, windows

I am using InstallAware Studio Admin for creating a setup file for our .Net windows applications in order to distribute it to the users. Recently we had set the Target Framework of the application to ".Net Framework 4.7" and this needs to be added as runtime to our application in our setup file so that it gets installed on client machine if and only if the .net Framework on the client machine is less than 4.7

In the Installaware script, i am comparing the .NET framework version present in the registry with that of the .NET framework version present in the setup file and then install it on client machine. During the testing process i had verified that the version comparison is getting failed and .net framework not getting installed in machine having .net Framework < 4.7 .

Following is the script i am using in installaware to compare the version and perform the installation

enter image description here

Here DOTNETCurrentVersion is set to 4.7 whereas the DOTNETRegistryVersion being returned as 4.6.01586. Even though the current version is greater than registry version the code inside the if block is not getting executed

Can you please suggest what needs to be done in order to perform the version comparison correctly?

Source: Windows Questions

LEAVE A COMMENT