Christian Blackburn
4/2/2008 10:32:00 PM
Hi Gang,
Does anyone know a best practices method for locating the correct
version of RegASM.exe using the registry?
This is the strategy I've come up with and just want to make sure
there isn't something potentially problematic in my method:
1. Read "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework,
InstallRoot" to determine the .NET framework's path
2. Figure out what revision of .NET the folder is named after:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v2.0,
locate the first value in there and then append that to the path from
step 1:
In other words add the following together "C:\WINDOWS\Microsoft.NET
\Framework\" + "v2.0." + "50727" making:
C:\Windows\microsoft.NET\Framework\v2.0.50727
from there I just look for regasm.exe in that folder. Am I do
anything wrong here? Is there an easier way? Perhaps a single
registry key read that yeilds the path directly and more reliably?
Thanks,
Christian Blackburn