How can I check if .NET 2.0 is installed on a computer? Would checking if %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727 exists be sufficient?
Printable View
How can I check if .NET 2.0 is installed on a computer? Would checking if %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727 exists be sufficient?
This is just one way of checking. But a proper way would be to look in the registry [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy]. This key will give you details of each framework.
The million dollar question would be, how are you planning to check which version is installed. What language are you going to use.
A C++ 6.0 implementation is present in this article
http://www.codeproject.com/cpp/DotNetTester.asp
Thanks for the reply.
Considered just using a simple script to check the version;
However if I need to read from the registry I might need to re-think my plan.Code:if not exist %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727 dotnetfx.exe
I am using NSIS to create my installation file, and it has way to find what .Net version is installed, if any.
Better to check from registry and also most cases from pc performance you also can judge as it is known to slower speed.....