This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Is() function does not work properly for detecting Dot Net framework 2.0
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 28, 2012
04:41 AM
Is() function does not work properly for detecting Dot Net framework 2.0
Hello,
I was writing a function to detect the .net framework and the service pack level installed on the computer. I am using the code below to check the .net framework 2.0 and its service pack level.
//Check .net Framework 2.0, 2.0_SP1, 2.0_SP2
if (Is(DOTNETFRAMEWORKINSTALLED, REGDB_KEYPATH_DOTNET_20)) then
szMaxVersion = "2.0.0.0";
if (Is(DOTNETSERVICEPACKINSTALLED, "1|" + REGDB_KEYPATH_DOTNET_20)) then
nMaxSP = 1;
endif;
if (Is(DOTNETSERVICEPACKINSTALLED, "2|" + REGDB_KEYPATH_DOTNET_20)) then
nMaxSP = 2;
endif;
endif;
My computer has .net f/w 2.0 with SP2 installed (see attachment) but
when I debug the code both the checks for service pack passes. Please help.
Am I doing something wrong?
I was writing a function to detect the .net framework and the service pack level installed on the computer. I am using the code below to check the .net framework 2.0 and its service pack level.
//Check .net Framework 2.0, 2.0_SP1, 2.0_SP2
if (Is(DOTNETFRAMEWORKINSTALLED, REGDB_KEYPATH_DOTNET_20)) then
szMaxVersion = "2.0.0.0";
if (Is(DOTNETSERVICEPACKINSTALLED, "1|" + REGDB_KEYPATH_DOTNET_20)) then
nMaxSP = 1;
endif;
if (Is(DOTNETSERVICEPACKINSTALLED, "2|" + REGDB_KEYPATH_DOTNET_20)) then
nMaxSP = 2;
endif;
endif;
My computer has .net f/w 2.0 with SP2 installed (see attachment) but
when I debug the code both the checks for service pack passes. Please help.
Am I doing something wrong?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 29, 2012
08:21 AM
It might be the structure of your if-then-endif statements.
I got this similar code to work, separated into two separate if-then-endif statements:
I got this similar code to work, separated into two separate if-then-endif statements:
if (Is(DOTNETFRAMEWORKINSTALLED, REGDB_KEYPATH_DOTNET_20)) then
MessageBox("dotnet 20 installed", MB_OK);
endif;
if (Is(DOTNETSERVICEPACKINSTALLED, "1|" + REGDB_KEYPATH_DOTNET_20)) then
MessageBox(dotnet 20 SP1 installed", MB_OK);
endif;