. OCX,. dll file Registration command Regsvr32 use

Source: Internet
Author: User
Tags win32 error

1. Open the file, open the OCX file or DLL file you want to register,
2. Registration and anti-registration of the OCX file or DLL file as required

Dll. OCX Registration Method--File Regsvr32 usage and situation Introduction

People who have used ActiveX know that ActiveX is not registered to be recognized and used by the system, and the general installer automatically registers the ActiveX controls it uses, but what if you get a control that requires manual registration? If you modify the registry that's too much of a hassle, there's a regsvr32.exe program under the Windows System folder, which is the ActiveX registration and anti-registration tool that comes with Windows.

First, the use of Regsvr32 is:
"regsvr32 [/s] [/n] [/I (: cmdline)] dllname". Where Dllname is the name of the ActiveX control, it is recommended that you copy it to the System folder before installation.

The parameters have the following meanings:

/u--Anti-registration controls

/s--does not display the prompt box regardless of the registration success or not

/c--Console output

/i--the option to skip the control to install (unlike registration)

/n--do not register controls, this option must be used with the/I option

How to execute the command:

1, can be "start"-"Run", call up the running dialog box, you can also use the Win+r hotkey, and then directly in the input field to enter
2, start-run the input cmd, bring up the ' Command Prompt ' window, and then execute the regsvr32 command.

Ii. Description of the REGSVR32 error message
When Regsvr32.exe is used, it tries to load the component and calls its DLLSelfRegister function. If this attempt succeeds, Regsvr32.exe displays a dialog box that indicates success. If this attempt fails, Regsvr32.exe returns an error message, which may include a Win32 error code.

The following list describes the RegSvr32 error messages and possible causes.

Unrecognized Flag:/invalid_flag

The combination of flags or switches you typed is not valid (see the "Usage of Regsvr32.exe" section in this article).

No DLL name specified.

The. dll file name is not included (see the "Usage of Regsvr32.exe" section in this article).

Dllname was loaded, and the DllRegisterServer or DllUnregisterServer entry point is not found.

Dllname is not a. dll or. ocx file. For example, typing regsvr32 wjview.exe generates the error message.

Dllname is a executable file and no registration helper is registered for the this file type.

Dllname is not an executable file (. exe,. dll, or. ocx). For example, typing regsvr32 autoexec.bat generates the error message.

Dllname was loaded, and the DllRegisterServer or DllUnregisterServer entry point is not found.

Dllname may not be exported, or there may be a corrupted version of Dllname in memory. Consider using Pview to detect the file and delete it.

Dllname is isn't self-registerable or a corrupted version is in memory.

For example, the error message is returned after you type regsvr32 icwdial.dll because the Icwdial.dll file cannot be registered by itself.

If you suspect that there is a corrupted version of Dllname in memory, try restarting the computer or re-extracting the original version of the file.

If you are running Windows NT, you may need to use the Kill or Pview tool in the Microsoft Windows NT Server 4.0 Resource Kit. For additional information, click to view the following Microsoft Knowledge Base article: 197155 How to terminate an orphaned process
OleInitialize failed (or OleUninitialize failed).

Regsvr32 must initialize the COM library before invoking the required COM library functions and undoing the initialization of the library when it is closed.

These error messages occur if an attempt to initialize or revoke the initialization of a COM library fails. For example, the Ole32.dll file

may be damaged, or its version is incorrect.

LoadLibrary ("Dllname") failed. GetLastError returns 0x00000485

In Winerror.h, 0x00000485 = 1157 (error_dll_not_found) means "one of the library files needed to run the application cannot be found." For example, if the Missing.dll file is not found after you type regsvr32 missing.dll, the error message is returned.

LoadLibrary ("Dllname") failed. GetLastError returns 0x00000002

In Winerror.h, 0x00000002 = 2 (error_file_not_found), which means "the system cannot find the file specified." In other words, the system cannot find the associated DLL. For example, if you type regsvr32 icwdial.dll and the Tapi32.dll (dependency) is missing, the error message is returned.

LoadLibrary ("Dskmaint.dll") failed. GetLastError returns 0x000001f in Winerror.h, 0x000001f = (error_gen_failure), means "devices attached to the system do not work". This behavior can occur if you try to register a Win16. dll file. For example, typing regsvr32 dskmaint.dll returns the error message.

DllRegisterServer (or DllUnregisterServer) in Dllname failed. Return code is: string

Searches for strings in Winerror.h.
Regsvr32.exe and Dependencies
RegSvr32.exe relies on Kernel32.dll, User32.dll, and Ole32.dll files (in Windows NT, also on Msvcrt.dll and Advapi32.dll files). Regsvr32.exe will load the file you are trying to register or unregister and all of its dependencies. If the required files are missing or they are corrupted, the process may fail.

You can use Depends.exe to determine the dependencies of the file that you are trying to register or unregister. Depends.exe is provided in both the Microsoft Windows 98 Resource Kit and the Microsoft Windows NT 4.0 Resource Kit support tool.
247024 Tools Included with the Microsoft Windows 98 Resource Kit

A city fast registration of DLL and OCX method

Watch it, lo! Here's how:

1. Find C:\Windows\System\Regsvr32.exe in Explorer and "copy" (right-click to copy)
2. After moving the directory to C:\Windows\SendTo, perform a "Paste Shortcut" (Press the right mouse button to paste the shortcut)
3. Change the name of the shortcut to "REGISTER"
4. OK

Now, if you want to do a registration action for a file, for example: C:\Windows\System\Test.ocx, you just open the Explorer, find the C:\Windows\System\Test.ocx, right-click "Transfer to" register You can complete the registration action!

Note: One place to note is that Regsvr32.exe can only register 32-bit files! If you want to use it to register a 16-bit file, an error message will be generated.
One, easy to repair IE browser

regsvr32 Shdocvw.dll
regsvr32 Oleaut32.dll
regsvr32 Actxprxy.dll
regsvr32 Mshtml.dll
regsvr32 Urlmon.dll

Role:
1, run the above command at the same time not only to solve the IE can not open a new window, with the mouse to click on hyperlinks and no response to the problem;
2, can also solve large and small other IE problems, such as Web page display is not complete, Java effect does not appear, the webpage does not automatically jump, open certain website general prompt ' can't display this page ' and so on.

Second, solve the problem that Windows cannot upgrade online

regsvr32 wupdinfo.dll

Role:
Windows has a lot of vulnerabilities, and every once in a while you need to upgrade online using the Windows Update upgrade program, but "Windows Update" is often unusable, and we can use REGSVR32 to solve this problem.

Third, prevent network script virus has the newly-

regsvr32/u Scrrun.dll

Role:
Network script virus embedded in the Web page, the Internet when unknowingly, the machine will infect the virus. The author thinks that the simple use of anti-virus software can not effectively prevent these script viruses, must start from the mechanism of virus transmission. The replication and propagation of network script viruses are inseparable from FSO objects (File system object, filesystem objects), so disabling FSO objects can effectively control the propagation of script viruses.
If you need to use the FSO object, type the regsvr32 scrrun.dll command.

Iv. Uninstall the Zip function with Win XP

Regsvr32/u Zipfldr.dll

Role:
Win XP is known for its powerful features, but some features often make "chicken ribs", such as the zip function and Image Preview feature of Win XP, not only occupy the system resources, function is far less powerful than third-party software. In fact, these features can be easily uninstalled with the Regsvr32 command.

Five, repair cannot thumbnail view file problems

2000: Start → run, input regsvr32 C:\Winnt\System32\thumbvw.dll
XP: Start → run, input regsvr32 shimgvw.dll

Vi. let WMP player support RM format

Many friends like to use Windows Media Player (WMP) player, but it doesn't support RM format, does it have to install other playback software? I have a way.

Take win XP for example, first download an RM format plug-in, unzip to get two folders: Release (for Windows 9x) and release Unicode (for Windows 2000/XP); Copy the Realmediasplitter.ax file under the Unicode folder to the "system drive letter \windows\system32\" directory, type "regsvr32 realmediasplitter.ax" in "Start → run" and click " Ok. Then download the decoder, such as real alternative, after installation can be used to play RM format video files in WMP.

Seven, let the WMP9 player appear

Some music pages online song needs to use media Player, some friends clearly installed WMP9, but the online listening to music but only to see the boring WMP6 player panel, want to make beautiful WMP9 panel appear, of course, no problem.

Frequently asked questions operating systems most win 98, first turn off IE, and then in "Start → run" type "regsvr32 wmpdxm.dll", click "OK".

Viii. Resolve no response when opening system functions

regsvr32 shdocvw.dll

Role:
Sometimes you can click on the XP system's search function, help and support or management tools from the Start menu, but there is no response, this is the lack of association in their open way, so we just use regsvr32 to register they need to invoke the Dynamic connection library file.

Nine, add/Remove Programs can't open

regsvr32 appwiz.cpl
regsvr32 Mshtml.dll
regsvr32 jscript.dll
regsvr32 msi.dll
regsvr32 C:\Program Files\Common Files\System\Ole DB\Oledb32.dll
regsvr32 C:\Program Files\Common Files\system\ado\msado15.dll
regsvr32 mshtmled.dll
regsvr32/i Shdocvw.dll
regsvr32/i Shell32.dll

Role:
When you open Add/Remove Programs in Control Panel, when you double-click its icon, or turn it off automatically, try using the above command to resolve it.
The mysterious command-regsvr32 jscript.dll

1, with the above-mentioned repair IE browser method in conjunction with the use, can be a good solution to browse some of the Web page display is incomplete, and it is possible to resolve the IE status bar display ' Error on the page ' prompt. Take the homepage of the Internet Assistant as an example:

2, with the command regsvr32 vbscript.dll with the use, Repair individual window blank, such as XP ' Search ' function of the Search Assistant operator panel blank and System Restore function can not be used and so on.

3. Prompt ' internal application error ' when Windows Media Player 9 or later is open.

4, can repair Win 2000 ' Add/Remove Programs ' open a blank.

. OCX,. dll file Registration command Regsvr32 use

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.