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
http://www.apress.com/book/view/1590592972


"Christian Blackburn" <christian.Blackburn@xxxxxxxxx> wrote in message
news:9b7545f3-406a-452f-b354-801330d89936@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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


.