cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ecaron
Level 2

Detect .NET Framework 4 SP1 with installscript ?

How I can detect .NET Framework 4 SP1 with installscript ? Code sample ?
Labels (1)
0 Kudos
(2) Replies
Shmulik2k
Level 2

ecaron wrote:
How I can detect .NET Framework 4 SP1 with installscript ? Code sample ?


function BOOL IsdotNetInstalled(szVer)
STRING szKey;
NUMBER nRes;
begin
szKey = "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v" + szVer;

nRes = RegDBKeyExist(szKey);

if(nRes < 0) then
//dotNet 4 is not installed
return 0;
else
return 1;
endif;

end; // end of function


you can also check the "Install" value under the same registry key (it needs to be equal to 1) using
RegDBGetKeyValueEx ( szKey, "Installed", nvType, svValue (here you will get 1 or 0 in case there is a key for dotnet), nvSize )
0 Kudos
ecaron
Level 2

This code half work because to detect Framework 4 we must detect full or client version of version 4 like in this attachment

0 Kudos