PDA

View Full Version : Detecting and installing .NET and not using setup.exe



titelee79
11-04-2005, 07:26 PM
Is there a way/property to detect whether .NET 1.1 is installed on the target system and abort the installation if it is not?

I have tried using the properties in the Release View Grid:
.NET Framework Location - Download From The Web
.NET Framework Version - .NET 1.1
Display .NET Option Dialog - No
Show full User interface when installing .NET framework - No

These properties seem to only be used if I include setup.exe with my installation and only work when the user tries to install using setup.exe. Unfortunately, for our product we use scripts that require the use of a .msi file (not setup.exe) and we would still like to be able to check for .NET 1.1

MichaelU
11-07-2005, 12:14 PM
You can create a launch condition that looks for the appropriate Install or SP dword in HKLM\Software\Microsoft\NET Framework Setup\NDP\{version}.

titelee79
11-07-2005, 06:41 PM
Thank you for the reply.

I have tried to do this using the System Search Wizard.
I selected "Registry Entry" from the list.
For registry root I picked "HKEY_LOCAL_MACHINE".
For registry key I entered "SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322"
For registry value I left it blank.
Your installation will be allowed to proceed if the search you created is: "Found"
Enter the text you wish to display to the user... condition is not met: "aaaaa"

With these vaules entered, it always acts as though they key is not found and gives the error messages. It is prolly something simple that I'm doing wrong. Any ideas what?

titelee79
11-09-2005, 04:00 PM
Anyone know what I'm doing wrong?

Somebody
11-10-2005, 03:09 PM
I recently had a similar problem and found by searching on the internet that basically you cannot leave the registry value blank. Instead, pick one of the registry values you expect to be in the registry key (ex: "Install").

titelee79
11-10-2005, 03:16 PM
Thank you for your response, that worked.

I also noticed that the System Search Wizard works 2 different ways depending on where it was opened from. Project Assistant versus System Search View.

MartinMarkevics
11-10-2005, 03:23 PM
Perhaps you can just use the MsiNetAssemblySupport standard MSI property. From the MSI Help:



The MsiNetAssemblySupport property indicates whether the computer supports common language run-time assemblies. On systems that support common language run-time assemblies, the installer sets the value of MsiNetAssemblySupport to the file version of Fusion.dll. The installer does not set this property if the operating system does not support common language run-time assemblies. When multiple versions of Fusion.dll are installed side-by-side on the user's computer, this property is set to the latest version of the Fusion.dll file. For example, if .NET Framework version 1.0.3705 (Fusion.dll version 1.0.3705.15)and .NET Framework version 1.1.4322 (Fusion.dll version 1.1.4322.314) are installed side-by-side, the MsiNetAssemblySupport property is set to 1.1.4322.314. For more information, see Assemblies

titelee79
11-10-2005, 05:28 PM
I looked into that too, but that value only returns the latest .NET Framework that is installed on the system. In this case, I was just checking for .NET 1.1 but even though this computer does have 1.1 installed, MsiNetAssemblySupoprt returned 2.0.5025 (.net 2.0 beta).

PhilWilson
11-11-2005, 08:16 PM
I get the impression from this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondeterminingwhatversionofruntimetoload.asp

that the policy key is the one to look at to detect if it's installed. You'd search the key HKLM\SOFTWARE\Microsoft\.NETFramework\policy\v1.1 for the name 4322

willstott
11-14-2005, 03:23 AM
The program in my Code Project artcle allows you to detect whether .NET 2.0 is installed on the target platform. It covers deploying .NET 2.0 Apps with Installshield. Basically, it involves adding a Custom Action to run a script that starts a program to detect whether the target has v2.0 of .NET installed and then runs dotnetfx.exe as required.

http://www.codeproject.com/useritems/InstallDotNet2.asp

I've supplied full source code + .exe, the script and instructions for adding it to a project using InstallShield X. There's also a sample project.

It doesn't handle the problem of installing to a target that doesn't have Windows Installer 3.0 because there doesn't seem to be a way to install Windows Installer 3.0 from another installation program. Perhaps, I need to write a bootstrap installer program to do this. Ideas anyone?

I hope this helps you out.

Will