Re: Locating RegAsm.exe

I hope you're not in a Setup & Deployment Project or any other half-way
decent install tool because these tools do registration for you anyway.

Phil Wilson
Definitive Guide to Windoows Installer

"Christian Blackburn" <christian.Blackburn@xxxxxxxxx> wrote in message
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:
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:

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?

Christian Blackburn