Created
November 9, 2017 10:19
-
-
Save SteGriff/b247f5a95b5a4a35c2a22e87016427ec to your computer and use it in GitHub Desktop.
A foolproof 32/64 bit regasm script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM | |
REM Fill in your DLL directory on the cd line | |
REM Fill in your DLL name on the two RegAsm lines | |
REM | |
echo "Registering (thing)..." | |
cd "%programfiles(x86)%\Location\OfMy\Library" | |
echo "Changed directory. Trying 32 bit..." | |
%WINDIR%\Microsoft.Net\Framework\v4.0.30319\RegAsm.exe MyLibrary.dll /tlb /codebase | |
if ERRORLEVEL 100 ( | |
echo "Trying 64 bit..." | |
%WINDIR%\Microsoft.Net\Framework64\v4.0.30319\RegAsm.exe MyLibrary.dll /tlb /codebase | |
) | |
echo "Finished registering" | |
echo: | |
echo %ERRORLEVEL% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment