title: Good way to script regasm and gacutil for a COM Interop DLL on a developer machine
body: <p>I'm working on a .NET library that is intended to be consumed in a VB6 project.  To set up the dll to be used on my developer machine, <a href="https://stackoverflow.com/questions/3062264/does-order-matter-when-registering-gac-ing-assemblies-for-com-interop">I use <code>regasm</code> and <code>gacutil</code></a>, like so:</p>
  
  <pre><code>regasm /tlb:MyDll.tlb Mydll.dll 
  
  gacutil /i Mydll.dll 
  </code></pre>
  
  <p>On each subsequent call, I also unregister/uninstall the assembly:</p>
  
  <pre><code>regasm /u /tlb:MyDll.tlb Mydll.dll
  regasm /tlb:MyDll.tlb Mydll.dll 
  
  gacutil /u Mydll
  gacutil /i Mydll.dll 
  </code></pre>
  
  <p>Currently, I'm doing this from the Visual Studio Tools command prompt.  Is there a way to script these commands into one execution path?</p>
  
  <p><em>NOTE: This script is intended only for my</em> <strong><em>developer machine</em></strong> <em>where <code>regasm</code> and <code>gacutil</code> are both readily available.</em></p>