How to find Regasm.exe and use it in a .Bat file
I need to use RegAsm.exe to register several assemblies in a .bat file; however, since RegAsm.exe is not in the system path, it is difficult to just use like Regsvr32 which is always in the system path. I suppose the reason for this is that there can be multiple .NET Frameworks installed and you need to use the correct one.
You can use the WINDIR enviroment variable to get the root of the path. It will probably be something like:
C:\WINDOWS
You then need to add "\Microsft.NET\Framework\" to the path, and finally the path to the specific .NET Framework you are using:
SET fwpath="%windir%\Microsoft.NET\Framework\v2.0.50727"
%fwpath%\regasm.exe app.dll