Usage method of Regsvr32

by fbishuai4 on 2010-09-13 16:44:47

regsvr32 Application Method

Those who have used ActiveX know that ActiveX cannot be recognized or used by the system unless it is registered. Generally, installation procedures will automatically register the ActiveX controls they use. But what if you need to manually register a control? Editing the registry would be too cumbersome. In the Windows System folder, there is a regsvr32.exe program which is a built-in ActiveX registration and unregistration tool in Windows. Its usage is: Consulting Company

"regsvr32 [/s] [/n] [/i(:cmdline)] dllname". Here, dllname is the name of the ActiveX control file, and it is recommended to copy it to the System folder before installation.

The parameters have the following meanings:

/u - Unregister the control

/s - Do not display any message boxes regardless of whether the registration succeeds or fails

/c - Console output

/i - Skip the optional installation of the control (different from registration)

/n - Do not register the control; this option must be used together with the /i option

 

regsvr32 Command for System Troubleshooting

The regsvr32 command is a useful tool provided by the Windows system. It is used to register or uninstall controls, and using this command can help recover lost system functions. The regsvr32 command runs in the command-line interface, with the syntax: regsvr32 [/u] filename, where filename is the control file name. Without the parameter u, it registers the control, and with the parameter u, it uninstalls the control.

l. Restore Image Preview Function: The image preview function in Windows XP corresponds to the control file thurnbvw.dll. If this function is broken, click "Start" -> "Run", and in the "Open" box, enter: "regsvr32 thurnbvw.dll", then click "OK" to execute the command. A prompt box will appear saying: "dllregisterserver in thumbvw.dll succeeded.", indicating successful control registration. After restarting the computer, the image preview function in Windows XP will be restored.

2. Restore ZIP Function: Windows XP provides a ZIP function. Although it's not very powerful, it allows opening ZIP files without third-party software and treating ZIP archives as folders, making it a convenient and practical feature. If this function is broken, run the command "regsvr32 zipfldr.dll" in the Run dialog box, then restart the computer to restore the function.

3. Restore IE New Window Hyperlink Function: There are two types of hyperlinks in IE - one that jumps within the current page, and another that opens in a new window. For the first type, holding down the Shift key can open links in a new window. Many people have encountered the issue of not being able to open links in a new window, which is caused by lost control registration information. The solution is to run three commands in the Run dialog box: "regsvr32 actxprxy.dll", "regsvr32 shdocvw.dll", and "regsvr32 oleaut32.dll". After successfully registering these three controls, restart the computer, and IE will return to normal.

4. Restore FSO Function: Many people use their computers to build forums or websites. Forum or dynamic website scripts can perform online file management, allowing administrators to operate files through the webpage. However, often people report that their forums or websites cannot manage files online, which is due to the server's FSO function not being enabled or experiencing issues. The solution is to run "regsvr32 sorrun.dll" in the server's Run dialog box, then restart the server to enable/restore the FSO function.Human Resources Consulting

5. Restore Online Update Function: At the top of the Windows "Start" menu, there is a "Windows Update" item that can quickly update the system online. However, sometimes you may find that you cannot perform an online update. To resolve this issue, run the command "regsvr32 wupdinfo.dll" in the Run dialog box, then restart the computer to fix the problem.

 

What is the rundll32.exe Program

What is rundll32.exe? As its name suggests, "Execute 32-bit DLL files." Its purpose is to execute internal functions in DLL files. During this process, only rundll32.exe will appear, and no separate DLL backdoor processes will be created, achieving process-level stealth. If you see multiple instances of rundll32.exe in your system, don't panic; this indicates that several DLL files were launched using rundll32.exe. Of course, we can find out which DLL files these rundll32.exe instances are executing by checking the system's auto-load locations.

Now, let me introduce the rundll32.exe file. Its meaning has already been explained above; its function is to call dynamic link libraries via the command line. There is also a rundll.exe file in the system, which means "execute 16-bit DLL files," so please note this distinction. Let's take a look at the function prototype used by rundll32.exe:

void callback functionname (

hwnd hwnd,

hinstance hinst,

lptstr lpcmdline,

int ncmdshow

);

The method of using it in the command line is: rundll32.exe dllname, functionname [arguments]

dllname is the name of the DLL file to be executed; functionname is the specific exported function of the DLL file to be executed; [arguments] are the specific parameters of the exported function.

A Brief Discussion on the Role of rundll32.exe (I'm a Beginner) Sodium Gluconate

Users familiar with Windows 9x will not be unfamiliar with the files rundll32.exe and rundll.exe. However, since the functionality of these programs was originally limited to internal use by Microsoft, few people truly know how to use them. So, if you're unclear, let me explain.

First, try a small experiment (please save any work in progress beforehand): Click "Start - Programs - MS-DOS Prompt," enter the DOS window, then type "rundll32.exe user.exe, restartwindows," and press Enter. You'll see the machine reboot! Interesting, isn't it?

Of course, the functionality of rundll goes beyond just rebooting your machine. In fact, as its name implies, it executes DLLs, calling Windows' dynamic link libraries from the command line. The difference between rundll32.exe and rundll.exe lies in the former calling 32-bit libraries while the latter is used for 16-bit libraries. Their command syntax is:

rundll.exe ,,

Here are three points to note: 1. The DLL filename cannot contain spaces; for example, if the file is located in c:\program files\, you should change the path to c:\progra~1\. 2. The comma between the DLL filename and the DLL entry point cannot be omitted, otherwise, the program will error without providing any information! 3. Most importantly, rundll cannot be used to call DLLs with return value parameters, such as getusername() or gettextface() in Win32 API. In Visual Basic, there is an instruction called Shell to execute external programs, with the syntax:

Shell "command line"

If you can combine Shell with rundll32.exe effectively, it can produce results that are difficult or even impossible to achieve with other methods: Taking rebooting as an example, traditionally, you would need to create a module in your VB project, write in the WINAPI declaration, and finally call it in your program. Now, all it takes is one line:

Shell "rundll32.exe user.exe, restartwindows" and it's done! Isn't that much more convenient?

In fact, rundll32.exe has unique advantages in calling various Windows Control Panels and system options. Below, I've listed some rundll commands I've collected from the Internet (very useful, saving you a lot of time calling Windows APIs!!), for reference in your program design: Filter

Command Line: rundll32.exe shell32.dll, control_rundll

Function: Display Control Panel

Command Line: rundll32.exe shell32.dll, control_rundll access.cpl,,1

Function: Display "Control Panel - Accessibility Options - Keyboard" option window

Command Line: rundll32.exe shell32.dll, control_rundll access.cpl,,2

Function: Display "Control Panel - Accessibility Options - Sound" option window

Command Line: rundll32.exe shell32.dll, control_rundll access.cpl,,3

Function: Display "Control Panel - Accessibility Options - Display" option window

Command Line: rundll32.exe shell32.dll, control_rundll access.cpl,,4

Function: Display "Control Panel - Accessibility Options - Mouse" option window

Command Line: rundll32.exe shell32.dll, control_rundll access.cpl,,5

Function: Display "Control Panel - Accessibility Options - Conventional" option window

Command Line: rundll32.exe shell32.dll, control_rundll sysdm.cpl @1

Function: Execute "Control Panel - Add New Hardware" wizard.

Command Line: rundll32.exe shell32.dll, shhelpshortcuts_rundll addprinter

Function: Execute "Control Panel - Add New Printer" wizard.

Command Line: rundll32.exe shell32.dll, control_rundll appwiz.cpl,,1

Function: Display "Control Panel - Add/Remove Programs - Install/Uninstall" panel.

Command Line: rundll32.exe shell32.dll, control_rundll appwiz.cpl,,2

Function: Display "Control Panel - Add/Remove Programs - Install Windows" panel.

Command Line: rundll32.exe shell32.dll, control_rundll appwiz.cpl,,3

Function: Display "Control Panel - Add/Remove Programs - Startup Disk" panel.

Command Line: rundll32.exe syncui.dll, briefcase_create

Function: Create a new "My Briefcase" on the desktop.

Command Line: rundll32.exe diskcopy.dll, diskcopyrundll

Function: Display Copy Floppy Disk window Glass Bottle Factory

Command Line: rundll32.exe apwiz.cpl, newlinkhere %1

Function: Display "Create Shortcut" dialog box, the position of the shortcut is determined by the %1 parameter.

Command Line: rundll32.exe shell32.dll, control_rundll timedate.cpl,,0

Function: Display "Date & Time" option window.

Command Line: rundll32.exe shell32.dll, control_rundll timedate.cpl,,1

Function: Display "Time Zone" option window.

Command Line: rundll32.exe rnaui.dll, rnadial [Name of Dial-up Connection]

Function: Display dial-up window for a specific dial-up connection. If already connected, it displays the current connection status window.

Command Line: rundll32.exe rnaui.dll, rnawizard

Function: Display "New Dial-up Connection" wizard window.

Command Line: rundll32.exe shell32.dll, control_rundll desk.cpl,,0

Function: Display "Display Properties - Background" option window.

Command Line: rundll32.exe shell32.dll, control_rundll desk.cpl,,1

Function: Display "Display Properties - Screen Saver" option window.

Command Line: rundll32.exe shell32.dll, control_rundll desk.cpl,,2

Function: Display "Display Properties - Appearance" option window.

Command Line: rundll32.exe shell32.dll, control_rundll desk.cpl,,3

Function: Display "Display Properties - Settings" option window.

Command Line: rundll32.exe shell32.dll, shhelpshortcuts_rundll fontsfolder

Function: Display Windows "Fonts" folder. View Mirror

Command Line: rundll32.exe shell32.dll, control_rundll main.cpl @3

Function: Similarly, displays the Windows "Fonts" folder.

Command Line: rundll32.exe shell32.dll, shformatdrive

Function: Displays the Format Floppy Disk dialog box.

Command Line: rundll32.exe shell32.dll, control_rundll joy.cpl,,0

Function: Displays the "Control Panel - Game Controllers - General" option window.

Command Line: rundll32.exe shell32.dll, control_rundll joy.cpl,,1

Function: Displays the "Control Panel - Game Controllers - Advanced" option window.

Command Line: rundll32.exe mshtml.dll, printhtml (HTML document)

Function: Prints HTML documents.

Command Line: rundll32.exe shell32.dll, control_rundll mlcfg32.cpl

Function: Displays Microsoft Exchange Options window.

Command Line: rundll32.exe shell32.dll, control_rundll main.cpl @0

Function: Displays "Control Panel - Mouse" options.

Command Line: rundll32.exe shell32.dll, control_rundll main.cpl @1

Function: Displays "Control Panel - Keyboard Properties - Speed" option window.

Command Line: rundll32.exe shell32.dll, control_rundll main.cpl @1,,1

Function: Displays "Control Panel - Keyboard Properties - Language" option window.

Command Line: rundll32.exe shell32.dll, control_rundll main.cpl @2

Function: Displays Windows "Printers" folder. Industrial Ceramics

Command Line: rundll32.exe shell32.dll, control_rundll main.cpl @3

Function: Displays Windows "Fonts" folder.

Command Line: rundll32.exe shell32.dll, control_rundll main.cpl @4

Function: Displays "Control Panel - Input Method Properties - Input Methods" option window.

Command Line: rundll32.exe shell32.dll, control_rundll modem.cpl,,add

Function: Executes "Add New Modem" wizard.

Command Line: rundll32.exe shell32.dll, control_rundll mmsys.cpl,,0

Function: Displays "Control Panel - Multimedia Properties - Audio" tab.

Command Line: rundll32.exe shell32.dll, control_rundll mmsys.cpl,,1

Function: Displays "Control Panel - Multimedia Properties - Video" tab.

Command Line: rundll32.exe shell32.dll, control_rundll mmsys.cpl,,2

Function: Displays "Control Panel - Multimedia Properties - MIDI" tab.

Command Line: rundll32.exe shell32.dll, control_rundll mmsys.cpl,,3

Function: Displays "Control Panel - Multimedia Properties - CD Music" tab.

Command Line: rundll32.exe shell32.dll, control_rundll mmsys.cpl,,4

Function: Displays "Control Panel - Multimedia Properties - Devices" tab.

Command Line: rundll32.exe shell32.dll, control_rundll mmsys.cpl @1

Function: Displays "Control Panel - Sounds" option window.

Command Line: rundll32.exe shell32.dll, control_rundll netcpl.cpl

Function: Displays "Control Panel - Network" option window.Fiberglass Spiral Chute

Command Line: rundll32.exe shell32.dll, control_rundll odbccp32.cpl

Function: Displays ODBC32 Data Management Options window.

Command Line: rundll32.exe shell32.dll, openas_rundll [drive:,path,filename]

Function: Displays the "Open With" dialog box for the specified file (drive:,path,filename).

Command Line: rundll32.exe shell32.dll, control_rundll password.cpl

Function: Displays "Control Panel - Password" option window.

Command Line: rundll32.exe shell32.dll, control_rundll powercfg.cpl

Function: Displays "Control Panel - Power Options Properties" option window.

Command Line: rundll32.exe shell32.dll, shhelpshortcuts_rundll printersfolder

Function: Displays