pdprog
Posts: 5
Joined: Fri Aug 19, 2005 2:59 pm
Location: Lafayette, CO
Contact: Website

Installing .NET 1.1 when .NET 2.0 already exists

The default behaviour for checking for the existence of a version of .NET is look at the version of MSCOREE.dll in the System32 folder.

This method can not be used to determine if .NET 1.1 has been installed if .NET 2.0 exists on the system.

My app requires .NET 1.1 and forces its use when .NET 2.0 is found on the system. I needed the installer to check if .NET 1.1 exists on the system or not.

I ended up looking for the version of:
[WindowsFolder]\Microsoft.NET\Framework\v1.1.4322\mscorlib.dll
instead. This method seems to be working.

Perhaps the prerequisites panel could have .NET 1.1 and .NET 2.0 options in its list.

Thanks,

-pete
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Have you tried with .Net Framework from prerequisites list? To add it switch to "Media" page, "Prerequisites" tab and choose "Add->.Net Framework".

For min and max version set 1.1, thick "Force Installation of this prerequisites". With this condition the installation of your package will continue only if you have 1.1 version installed. If you have other version then the installation will not continue which is what you want. You can learn more about how to use prerequisites in Advanced Installer from following link:
http://www.advancedinstaller.com/user-g ... sites.html

Note that I use 1.1 version as an example. You can use any version number you want.

Hope this helps.
Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
pdprog
Posts: 5
Joined: Fri Aug 19, 2005 2:59 pm
Location: Lafayette, CO
Contact: Website

Thanks for your quick reply.

The problem is that the mscoree.dll file in the windows/system32 directory will always return the highest version of .NET that is on the system. So, if v2.0 is installed, it will always report 2.0 - never 1.1. Thus, every time the installer is run, it will require that 1.1 be downloaded and installed.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

To determine if .Net 1.1 is installed or not then an alternative method would be to use:
* Search Criteria: Registry SubKeys Enumeration
* Registry Key: HKLM\SOFTWARE\Microsoft\.NETFramework\policy (or HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP)
* Minimum: v1.1 (or 1.1.4322)
* Maximum: v1.1 (or 1.1.4322)

Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”