[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

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
2 Answers

Phil Wilson

4/3/2008 8:26:00 PM

0

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/...


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


Christian Blackburn

4/4/2008 6:18:00 PM

0

Hi Phil,

> 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.

I'm using Inno Setup 5.x and I would definitely call it a decent
install tool. It installs and uninstalls programs at least twice as
fast as the Windows Installer and still has better compression.
However, it only registers OCX and DLLs using RegSvr32, no regasm.
I'd be the first to agree that they need to add that feature though.
http://en.wikipedia.org/wiki/...

> Phil Wilson

Cheers,
Christian Blackburn