stevefal
Posts: 119
Joined: Wed Sep 03, 2008 9:02 pm
Location: Washington USA
Contact: Website

Not successfuly detecting .NET framework version

I want to require .Net 2.0 SP1 or higher, and install it if missing.

I am using the standard prerequisite install conditions (product code = {B508B3F1-A24A-32C0-B310-85786919EF28}), but on a machine with .NET 2.0 SP2, SP1 is not detected. So I get the prerequisite installer even though it's unnecessary.

How can I detect whether .NET 2.0 SP1 *or higher* is already present on a system?
Last edited by stevefal on Wed Jul 15, 2009 1:58 pm, edited 1 time in total.
stevefal
Posts: 119
Joined: Wed Sep 03, 2008 9:02 pm
Location: Washington USA
Contact: Website

Re: Not successfuly detecting .NET framework version

I think I've solved this. I deleted the factory condition for .NET 2.0 SP1 and add the following instead:

- reg value with specified content
HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727\Install; 1 ; exact match

- reg value with specified content
HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727\SP; 0; greater than

Tested and works against 2.0, 2.0 SP1, 2.0 SP2

Does this sound sufficient for the real world?
stevefal
Posts: 119
Joined: Wed Sep 03, 2008 9:02 pm
Location: Washington USA
Contact: Website

Re: Not successfuly detecting .NET framework version

To be 100% accurate, I'm testing for .Net 2.0 SP1 or better, but if missing, I install the latest - SP2.
Last edited by stevefal on Mon May 18, 2009 2:25 pm, edited 2 times in total.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Not successfuly detecting .NET framework version

Hi,

Unfortunately the 6.9.1 version of Advanced Installer has a bug in the .NET Framework 2.0 prerequisites. A bugfix will be included in the next version which is scheduled for release this week. Until then, you can use the detection criteria you mentioned.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kfironit
Posts: 8
Joined: Wed Jul 15, 2009 10:45 am

Re: Not successfuly detecting .NET framework version

Hello.

Is this bug fixed?
i am using version 7.1.1 and use the standard check of .net 2.0 installation.
when no .net installed at all, this is not working.

any idea?

i saw someone posted a message to check this directly against registry.
can you please explain how to do it?

Thanks!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Not successfuly detecting .NET framework version

Hi,

Yes, the bug was fixed in the 7.0 version.
i am using version 7.1.1 and use the standard check of .net 2.0 installation.
when no .net installed at all, this is not working.
Can you please give me more details about this? What problems are you encountering? Please note that the User Guide contains a how-to which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kfironit
Posts: 8
Joined: Wed Jul 15, 2009 10:45 am

Re: Not successfuly detecting .NET framework version

Hello,

Thank you for your reply.
i followed the instructions in the link you gave me.
somehow, this forces me to generate an exe for the installer. i prefer not to do that.
all i want to do, is check if .Net is installed.
i checked the .Net section in the launch conditions tab in prerequisites and selected .Net Framework 2.0.
this did not generated a message when running on system with no .Net framework at all.

Thanks,

Kfir.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Not successfuly detecting .NET framework version

Hi,
somehow, this forces me to generate an exe for the installer. i prefer not to do that.
Prerequisites can be added to the installer only by using an EXE bootstrapper for the MSI.
i checked the .Net section in the launch conditions tab in prerequisites and selected .Net Framework 2.0.
this did not generated a message when running on system with no .Net framework at all.
I'm not sure why you are encountering this behavior. Can you please send us the .AIP (project) file you are using and a verbose log of the install process to support at advancedinstaller dot com so we can investigate them?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”