Codebox Software
Windows AutoReg Script
Published:
This small script will run regsrv32.exe against all .ocx and .dll files in the current directory, and can be used to register/unregister COM components en-masse
@echo off
for %%i in (*.ocx *.dll) do (
regsvr32 %* %%i
echo regsvr32 %* %%i
)
Notes
The script passes along any command-line parameters that you supply, to regsvr32.exe, so if you want a 'silent'
install (ie one where you don't get a popup box telling you that whatever-it-was has been registered - a good idea if you are
dealing with dozens of components!) then pass a /S option to the script. To uninstall the components, rather than
install them, pass a /U flag:
AutoReg.bat /S /U