Friday, March 25, 2011

How to Register Many DLLs/OCXs at Once

It is sometimes necessary to register a COM or ActiveX library. As far as you know, it is easy to perform it with help of Regsvr32 utility by Microsoft. But it is hard to type the name of library to be registered each time when you need to register a lot of them. It's really easier to copy all needful files to a single folder and then register them all with help of really simple script:
for %%i in (c:\DLL\ActiveX\*.dll) do regsvr32 %%i
for %%i in (c:\DLL\ActiveX\*.ocx) do regsvr32 %%i
Please note that you can register even remote files
for %%i in (\\192.168.102.184\DLL\*.dll) do regsvr32 %%i
for %%i in (\\192.168.102.184\DLL\*.ocx) do regsvr32 %%i
Hope you'll find this example useful.

No comments:

Post a Comment

Translate