First meet Regsvr32
I believe everyone is familiar with Regsvr32. You can always see it in some computer tutorials or computer magazines, but such a "little star" with high appearance seems very mysterious in the eyes of many of us. It turns out that ordinary articles rarely introduce it. At most, I just want to introduce how to use it to solve common problems. Many friends may have used Regsvr32 many times under the guidance of some articles, but they still don't understand its "life experience". Today, the author will use this article to dispel the doubts in everyone's mind and take you to know Regsvr32 together.
Regsvr32's background and functions
Regsvr32 is an embedded program for Windows system. It not only exists under Windows 2000/XP, but it is found in Windows 98. Its main function is to register or uninstall dynamic link library files (DLLs) and embedded controls (OCX). Don't underestimate it. With it, many software or operating system problems can be solved easily.
Basics
We just talked about DLL and OCX. I guess many readers will have such a question in their minds. What do these two things mean? What exactly can they do? Don’t worry, let me tell you slowly.
DLL file: The full name of the DLL file is Dynamic Link Library, and the Chinese name is "dynamic link library file". In Windows systems, a DLL file can complete a certain function just like an EXE file, but it cannot run independently like an EXE file. It must be called by other programs. It is also very important for program execution. Most programs or system components must be linked to a DLL file to run normally when executing. In other words, DLL files are like common function libraries in the database. Every designer can call them at will in his own program. This not only does not have to write some basic functions themselves (because these functions have been completed by DLL files), but also makes the program smaller. Therefore, if a DLL file is lost, it may cause a software or system module to fail and cannot work properly.
OCX file: The full name of OCX file is Object Linking and Embedding (OLE) Control Extension, the Chinese name is "Embedded Object Control". Its function is actually very similar to the DLL file I just talked about. In fact, we are already very familiar with the so-called OLE. Simply put, it is like using Excel data in Word, embedding image files in Word board, and other functions. For example, the clipboard is like a simple data sharing, while OLE is a kind of "object sharing".
We just talked about the function of Regsvr32 to register and uninstall DLL files. Now there is another problem that bothers us. Since the DLL file plays the role of a public function library, why can't we call it directly in the program and register it once? In fact, the reason for registering DLL files here is like our first time in school. Although you are sitting in the classroom, if you don't write your files, the teacher will not know you, and naturally you will not find you. By the same token, if the DLL file is not registered, there is no relevant information about the DLL file in the system registry. Although it already exists on our hard disk, when it is called, the system will not find the DLL file at all and can only report that the DLL does not exist. Therefore, we need to register the DLL file at this time.
[Tip] Since the DLL on Windows system has been registered during installation, it does not need to be registered. However, if the system cannot recognize these DLL files due to some situation, we still need to register them manually.
Regsvr32 command format
After saying these above, many friends must be a little confused when they heard it. Don’t worry, it will be much easier to know the above command.
As we all know, all commands must have a format, and Regsvr32 is no exception. Let’s take Windows XP as an example, execute the “CMD” command in the “Start” menu → “Run” bar, open the command prompt line window, enter the Regsvr32 command and press Enter, and you will see the Regsvr32 command format “Regsvr32 [ /u ][ /s ][ /n ][ /i [ :cmdline ] ] dll file name”.
From the above, we can see that the Regsvr32 command has four parameters, namely:
/s: The prompt box for successful operation will not be displayed after successful registration or uninstallation
/u: Uninstall installed controls or DLL files
/n: Do not call DLLRegisterServer, please note that this parameter should be used with /i
/i: Call DLLInstall and pass it an optional [cmdline]; used to uninstall DLL when using /u
The explanation of commands is often boring and difficult to understand. Let’s use an example to further understand the command format of Regsvr32. For example, if we want to register a dynamic link library file saved in the C:\Folder directory, then the command executed should be "Regsvr32 c:\folder\". If we plan to uninstall it after registration, it will be easier. Just execute the command "Regsvr32 /u c:\folder\". As shown in Figure 2, the prompt window for completing tasks normally is shown
Common error prompts
After using the Regsvr32 command for a long time, you may often see various error prompts. Here I have found some more representative errors to help you analyze them.
Error 1: The specific path to the DLL file is not specified
This kind of error is common, and it usually occurs when registering non-system DLL files. The reason is that the Regsvr32 program cannot find the specified DLL file in the default path and cannot complete the registration normally. The solution is also very simple. Just specify the specific storage path of the DLL file in the command. For example, "Regsvr32 c:\folder\" is a normal command.
Error 2: The file type to be registered incorrect
This kind of error is relatively few, but it is easy to appear on newbies. The reason is that the file the user wants to register is not a normal DLL file or OCX file at all, and Regsvr32 cannot complete the registration at all. The solution is to specify a normal DLL file or OCX file. For example, the original command is "Regsvr32 c:\abc\", and the correct command should be "Regsvr32 c:\abc\" (of course, you must also ensure that this file already exists and is completely correct)
Error 3: The DLL file name is not stated in the typed command
This error is mainly seen in novices like the previous example. The reason for this is that the DLL file name is not specified at all, so Regsvr32 naturally cannot know what to do, so this prompt pops up. The solution is to specify the DLL file or OCX file to operate.
Common error prompts
After using the Regsvr32 command for a long time, you may often see various error prompts. Here I have found some more representative errors to help you analyze them.
Error 1: The specific path to the DLL file is not specified
This kind of error is common, and it usually occurs when registering non-system DLL files. The reason is that the Regsvr32 program cannot find the specified DLL file in the default path and cannot complete the registration normally. The solution is also very simple. Just specify the specific storage path of the DLL file in the command. For example, "Regsvr32 c:\folder\" is a normal command.
Error 2: The file type to be registered is incorrect
This kind of error is relatively few, but it is easy to appear on newbies. The reason is that the file the user wants to register is not a normal DLL file or OCX file at all, and Regsvr32 cannot complete the registration at all. The solution is to specify a normal DLL file or OCX file. For example, the original command is "Regsvr32 c:\abc\", and the correct command should be "Regsvr32 c:\abc\" (of course, you must also ensure that this file already exists and is completely correct)
Error 3: The DLL file name is not stated in the typed command
This error is mainly seen in novices like the previous example. The reason for this is that the DLL file name is not specified at all, so Regsvr32 naturally cannot know what to do, so this prompt pops up. The solution is to specify the DLL file or OCX file to operate.
I believe everyone is familiar with Regsvr32. You can always see it in some computer tutorials or computer magazines, but such a "little star" with high appearance seems very mysterious in the eyes of many of us. It turns out that ordinary articles rarely introduce it. At most, I just want to introduce how to use it to solve common problems. Many friends may have used Regsvr32 many times under the guidance of some articles, but they still don't understand its "life experience". Today, the author will use this article to dispel the doubts in everyone's mind and take you to know Regsvr32 together.
Regsvr32's background and functions
Regsvr32 is an embedded program for Windows system. It not only exists under Windows 2000/XP, but it is found in Windows 98. Its main function is to register or uninstall dynamic link library files (DLLs) and embedded controls (OCX). Don't underestimate it. With it, many software or operating system problems can be solved easily.
Basics
We just talked about DLL and OCX. I guess many readers will have such a question in their minds. What do these two things mean? What exactly can they do? Don’t worry, let me tell you slowly.
DLL file: The full name of the DLL file is Dynamic Link Library, and the Chinese name is "dynamic link library file". In Windows systems, a DLL file can complete a certain function just like an EXE file, but it cannot run independently like an EXE file. It must be called by other programs. It is also very important for program execution. Most programs or system components must be linked to a DLL file to run normally when executing. In other words, DLL files are like common function libraries in the database. Every designer can call them at will in his own program. This not only does not have to write some basic functions themselves (because these functions have been completed by DLL files), but also makes the program smaller. Therefore, if a DLL file is lost, it may cause a software or system module to fail and cannot work properly.
OCX file: The full name of OCX file is Object Linking and Embedding (OLE) Control Extension, the Chinese name is "Embedded Object Control". Its function is actually very similar to the DLL file I just talked about. In fact, we are already very familiar with the so-called OLE. Simply put, it is like using Excel data in Word, embedding image files in Word board, and other functions. For example, the clipboard is like a simple data sharing, while OLE is a kind of "object sharing".
We just talked about the function of Regsvr32 to register and uninstall DLL files. Now there is another problem that bothers us. Since the DLL file plays the role of a public function library, why can't we call it directly in the program and register it once? In fact, the reason for registering DLL files here is like our first time in school. Although you are sitting in the classroom, if you don't write your files, the teacher will not know you, and naturally you will not find you. By the same token, if the DLL file is not registered, there is no relevant information about the DLL file in the system registry. Although it already exists on our hard disk, when it is called, the system will not find the DLL file at all and can only report that the DLL does not exist. Therefore, we need to register the DLL file at this time.
[Tip] Since the DLL on Windows system has been registered during installation, it does not need to be registered. However, if the system cannot recognize these DLL files due to some situation, we still need to register them manually.
Regsvr32 command format
After saying these above, many friends must be a little confused when they heard it. Don’t worry, it will be much easier to know the above command.
As we all know, all commands must have a format, and Regsvr32 is no exception. Let’s take Windows XP as an example, execute the “CMD” command in the “Start” menu → “Run” bar, open the command prompt line window, enter the Regsvr32 command and press Enter, and you will see the Regsvr32 command format “Regsvr32 [ /u ][ /s ][ /n ][ /i [ :cmdline ] ] dll file name”.
From the above, we can see that the Regsvr32 command has four parameters, namely:
/s: The prompt box for successful operation will not be displayed after successful registration or uninstallation
/u: Uninstall installed controls or DLL files
/n: Do not call DLLRegisterServer, please note that this parameter should be used with /i
/i: Call DLLInstall and pass it an optional [cmdline]; used to uninstall DLL when using /u
The explanation of commands is often boring and difficult to understand. Let’s use an example to further understand the command format of Regsvr32. For example, if we want to register a dynamic link library file saved in the C:\Folder directory, then the command executed should be "Regsvr32 c:\folder\". If we plan to uninstall it after registration, it will be easier. Just execute the command "Regsvr32 /u c:\folder\". As shown in Figure 2, the prompt window for completing tasks normally is shown
Common error prompts
After using the Regsvr32 command for a long time, you may often see various error prompts. Here I have found some more representative errors to help you analyze them.
Error 1: The specific path to the DLL file is not specified
This kind of error is common, and it usually occurs when registering non-system DLL files. The reason is that the Regsvr32 program cannot find the specified DLL file in the default path and cannot complete the registration normally. The solution is also very simple. Just specify the specific storage path of the DLL file in the command. For example, "Regsvr32 c:\folder\" is a normal command.
Error 2: The file type to be registered incorrect
This kind of error is relatively few, but it is easy to appear on newbies. The reason is that the file the user wants to register is not a normal DLL file or OCX file at all, and Regsvr32 cannot complete the registration at all. The solution is to specify a normal DLL file or OCX file. For example, the original command is "Regsvr32 c:\abc\", and the correct command should be "Regsvr32 c:\abc\" (of course, you must also ensure that this file already exists and is completely correct)
Error 3: The DLL file name is not stated in the typed command
This error is mainly seen in novices like the previous example. The reason for this is that the DLL file name is not specified at all, so Regsvr32 naturally cannot know what to do, so this prompt pops up. The solution is to specify the DLL file or OCX file to operate.
Common error prompts
After using the Regsvr32 command for a long time, you may often see various error prompts. Here I have found some more representative errors to help you analyze them.
Error 1: The specific path to the DLL file is not specified
This kind of error is common, and it usually occurs when registering non-system DLL files. The reason is that the Regsvr32 program cannot find the specified DLL file in the default path and cannot complete the registration normally. The solution is also very simple. Just specify the specific storage path of the DLL file in the command. For example, "Regsvr32 c:\folder\" is a normal command.
Error 2: The file type to be registered is incorrect
This kind of error is relatively few, but it is easy to appear on newbies. The reason is that the file the user wants to register is not a normal DLL file or OCX file at all, and Regsvr32 cannot complete the registration at all. The solution is to specify a normal DLL file or OCX file. For example, the original command is "Regsvr32 c:\abc\", and the correct command should be "Regsvr32 c:\abc\" (of course, you must also ensure that this file already exists and is completely correct)
Error 3: The DLL file name is not stated in the typed command
This error is mainly seen in novices like the previous example. The reason for this is that the DLL file name is not specified at all, so Regsvr32 naturally cannot know what to do, so this prompt pops up. The solution is to specify the DLL file or OCX file to operate.