Batch file (BAT file) Register DLL bulk Register Dll_dos/bat

Source: Internet
Author: User
But for beginners, even if you know the DLL file loss, but do not know which DLL file is helpless, so use this batch process can be registered DLL file, to solve the problems due to the DLL lost!

The following is a registered system32 directory of all DLLs
code as follows:
For%%i in (%windir%\system32\*.dll) do regsvr32.exe/s%%i


If you want to customize the directory can be changed to this
 code as follows:
For%%i in (the DLL file directory you want to register \*.dll) do regsvr32.exe/s%%i for%%i in (the DLL you want to register
Parts directory \*.ocx) do regsvr32.exe/s%%i


The following is a method for registering a single DLL file (here, for example, W32time.dll)
 code as follows:

@echo Start Registration
Copy W32time.dll%windir%\system32\
regsvr32%windir%\system32\w32time.dll/s
@echo Registration Successful
@pause

Replace the W32time.dll when used

The following is a single or multiple batch registration code, you can modify the

1) Registration

Regist.bat
 code as follows:

@echo Start Registration
net stop iisadmin/y
@echo jumps to the current batch file path
CD%~dp0
Copy DynamicGif.dll%windir%\system32
regsvr32%windir%\system32\dynamicgif.dll/s

Copy ImageOle.dll%windir%\system32
regsvr32%windir%\system32\imageole.dll/s
net start w3svc
@echo Registration Successful
@pause


2) Re-registration

Reregist.bat
code as follows:

@echo Re-register
net stop iisadmin/y
@echo jumps to the current batch file path
CD%~dp0
Regsvr32/u%windir%\system32\dynamicgif.dll/s
Del%windir%\system32\dynamicgif.dll
Copy DynamicGif.dll%windir%\system32
regsvr32%windir%\system32\dynamicgif.dll/s

Regsvr32/u%windir%\system32\imageole.dll/s
Del%windir%\system32\imageole.dll
Copy ImageOle.dll%windir%\system32
regsvr32%windir%\system32\imageole.dll/s
net start w3svc
@echo Re-registration successful
@pause


3) Anti-registration

Unregist.bat
 code as follows:

@echo Delete registration
net stop iisadmin/y
@echo jump to the current batch file path
CD%~dp0
regsvr32/u%windir%\system32\dynamicgif.dll/s
del%windir%\system32\dynamicgif.dll
regsvr32/u%windir%\ system32\imageole.dll/s
del%windir%\system32\imageole.dll
net start w3svc
@echo Delete Registration Success
@pause

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.