Determine if and where the .NET Framework is installed using VBA

I have an Excel spreadsheet that needs to determine if the .NET Framework is installed as well as the path to that install. How can this be acomplished in VBA code?

[215 byte] By [TU71] at [2008-1-9]
# 1

You can use the Registry "HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall" to determine existent soft. You need to use the API-functions RegQueryValueExString, RegOpenKeyEx and others
I have made this function, tomorrow I will test it (I will use PC without the FrameWork)
Do you still need in it?

bi-lya at 2007-10-2 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 2
For example check if exists %windir%/Microsoft.NET/Framework/ directory.

Regards.

vtortola at 2007-10-2 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 3

Hi!

It's good, but if soft isn't installed? Also, Windows Sistem may set in different PC on different disks (C, D, E...)

bi-lya at 2007-10-2 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 4
%windir% is a environment variable that point to Windows instalation path in this PC.

C:\Documents and Settings\ValerianoSrvr>set windir
windir=C:\WINNT

How a Windows system can be installed in a different PC ?

Regards.

vtortola at 2007-10-2 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 5

vtortola, I mean if you will use your code in other computer, it don't work if Sistem was set on disk E:\ or D:\
And I finished and tested my function. It "determine if the .NET Framework is installed as well as the path to that install"

bi-lya at 2007-10-2 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 6

Oh! i'm sorry , sometimes i have some problems with my english understanding Stick out tongue

Regards.

vtortola at 2007-10-2 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...