PDA

View Full Version : .NET Framework detection



markov
05-14-2007, 10:21 AM
Hi all.

This is my first post here and i must say i am total newbe regarding the installshield project. So i hope someone can help me on this:

- Is there any way to detect which version of .NET Framework is installed on the target system (e.g. the setup should end if the current version of framework is lower than 2.0)?

I have tried to write a dll that looks in the registry if there is framework entry existing and used some examples from the net on how to write the code but it all ended in not finding the function "make sure it is exported"..

I am like a bit desperate now. I'll be happy on any halp from you.

Tnx
Markov

euangriff
05-14-2007, 10:50 AM
You can check the registry for the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727 and value Install as detailed in the article http://msdn2.microsoft.com/en-us/library/aa480243.aspx#ndp2_ref_topic3

Put the check as a new launch condition on the requirements screen, using the system search wizard.

GregginCO
05-14-2007, 05:35 PM
I'm having a tough time with this as well, and I am using the system search.

Here is what I have done:

1) Included dotnetfx.exe as a component in the files list.

2) Added the System Search reg key for .Net 2.0:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727 and stored the value in a property called DOTNET20, using the Store in property value - NOT using as install condition as that interrupts the sequence

3) In Custom Actions, I defined the following:
Executable FileKey - dotnetfex.exe
Return Processing - Synchronous - ignore exit code
In Script execution - immediate
Execution Scheduling - Always execute
Install UI sequence - <absent from sequence> - no UI involved with this condiciton or action, IS there???
Install EXEC Sequence - After CostFinalize - right??
Install EXEC Condition - NOT DOTNET20 = 1 (the value of that reg key i listed above is 1 on my Dev machine)

Ok, from what I have read on this forum that seems right, but the dotnetfx.exe is NOT executing. What do I need to do to make it happen?

Thanks in advance!

oilspill
10-23-2007, 04:06 AM
I am checking for .NET Framework 2 installed using the above registry key but to correctly check then I you should really check that the key value "Install" has the value "1"
But when using the System Search Wizard the key is given as
"SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727"
and then the Registry value has to be "Install"
So where can we check what data value this has (either a 1 or 0)

thanks