Register or Unregister DLLs in a Folder

Sometimes when we’re debugging an application we might want to ensure that every DLL (or OCX) is registered correctly.  And rather than registering each assembly manually we can write a batch file to register or unregister DLLs in a folder:

@echo off

for %%v in ("C:\Program Files\Alkane\*.dll") do (
 	REM (unregister) regsvr32 /u /s "%%v"
	regsvr32 /s "%%v"