I have dll and ocx file on folder on c dirve and want to register just by clicking on batch file
According to this Microsoft knowledge base article:
Regsvr32.exe usage
RegSvr32.exe has the following command-line options: Regsvr32 [/u] [/n] [/i[:cmdline]] dllname /u - Unregister server /i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall /n - do not call DllRegisterServer; this option must be used with /i /s – Silent; display no message boxes (added with Windows XP and Windows Vista)
When you use
Regsvr32.exe
, it attempts to load the component and call itsDLLSelfRegister
function. If this attempt is successful,Regsvr32.exe
displays a dialog box that indicates success. If the attempt is unsuccessful,Regsvr32.exe
returns an error message. This may include a Win32 error code.
Thus, the resulting batch file will be:
echo off
Regsvr32 /s C:\MyDLL.dll
exit
Try this batch code:
for %%f in (*.ocx *.dll) do regsvr32 %%f
Open Notepad and paste in the code, then save the file as register.bat
and run it as an Administrator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With