rundll32.exe command Using Dafa _ Application Tips

Source: Internet
Author: User
Tags intl locale
What is Rundll32.exe? As implies, "execute a 32-bit DLL file." Its function is to execute the internal functions in the DLL file, so that in the process, there will be only Rundll32.exe, and no DLL back-door process, so that the process of the implementation of the hidden. If you see multiple Rundll32.exe in the system, don't panic, which proves how many DLL files have been started with Rundll32.exe. Of course, these Rundll32.exe execute DLL files, and we can all find them from where the system is automatically loaded.

Now, let me introduce you to the Rundll32.exe file, which means that the function is to invoke the dynamic Linker library as a command line. There is also a Rundll.exe file in the system, which means "execute a 16-bit DLL file," to be noted here. Look at the function prototypes used by Rundll32.exe:
Void CALLBACK functionname (
HWND hwnd,
HInstance Hinst,
LPTSTR lpCmdLine,
Int nCmdShow
);

The following methods are used under the command line: Rundll32.exe dllname,functionname [Arguments]
Dllname is the DLL file name that needs to be executed; functionname is the specific derivation function of the DLL file to be executed before, [Arguments] is the specific parameter of the derivation function.
A brief talk on the function of Rundll32.exe



Windows9x friends must be familiar with the two files of Rundll32.exe and Rundll.exe, but since the functions of these two programs were originally limited to being used within Microsoft, there must be few friends who really know how to use them. Well, if you're not sure, then let me tell you.
First of all, please do a small experiment (please save the results of the program you are executing in advance, otherwise ...) ): Click "Start-Program-ms-dos mode", enter the DOS window, and then type Rundll32.exe user.exe,restartwindows, then press ENTER, then you will see that the machine has been restarted! What, is it funny?
Of course, Rundll's function is more than just rebooting your machine. In fact, Rundll, as the name implies, the implementation of the DLL, it is the function of the command column to call the dynamic chain of Windows database, The difference between Rundll32.exe and Rundll.exe is that the former is called a 32-bit chain, and the latter is used in a 16-bit chain-node library, and their command format is:

Rundll. Exe
Here to note three points: 1. DLL file name can not contain spaces, such as the file is located in the C:\ProgramFiles\ directory, you want to change this path to c:\progra~1\;2. DLL file name and DLL entry point between the comma can not be less, otherwise the program will be wrong and will not give any information! 3. This is the most important point: Rundll cannot be used to call DLLs with return value parameters, such as GetUserName (), Gettextface (), and so on in Win32API. In Visual Basic, a directive shell that executes an external program is provided, in the form of:
Shell "command column"
If you can match Rundll32.exe with a good shell command, makes your VB program have an effect that is difficult or impossible to implement in other ways: Still, for example, the traditional method requires you to create a module in the VB project, and then write the WINAPI declaration before you can call in the program. And now just one sentence:

Shell "Rundll32.exe user.exe,restartwindows" is done! Is it more convenient?
In fact, Rundll32.exe has a unique advantage in calling various Windows Control panels and system options. Below, I will be my collection on the internet on the Rundll instructions listed below (very useful, can save you a lot of calls to the Windows API time!!) For you to refer to in your program design:
Command column: Rundll32.exe shell32.dll,Control_RunDLL
Function: Display Control Panel
Command column: rundll32.exe shell32.dll,Control_RunDLL access.cpl,,1
Features: Display the Control Panel-Accessibility-Keyboard Options window
Command column: rundll32.exe shell32.dll,Control_RunDLL access.cpl,,2
Features: Display the Control Panel-accessibility-Sound Options window
Command column: rundll32.exe shell32.dll,Control_RunDLL access.cpl,,3
Features: Display the Control Panel-accessibility-Show Options window
Command column: rundll32.exe shell32.dll,Control_RunDLL access.cpl,,4
Features: Display the Control Panel-accessibility-Mouse Options window
Command column: rundll32.exe shell32.dll,Control_RunDLL access.cpl,,5
Features: Display the Control Panel-Accessibility-Legacy Options window
Command column: rundll32.exe shell32.dll,control_rundll sysdm.cpl @1
Function: Perform the Control Panel-Add New Hardware wizard.
Command column: Rundll32.exe shell32.dll,shhelpshortcuts_rundll addprinter
Function: Perform the Control Panel-Add New Printer wizard.
Command column: rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,1
Features: Display the Control Panel-Add/Remove Programs-install/uninstall panel.
Command column: rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,2
Features: Display the Control Panel-Add/Remove Programs-install Windows panel.
Command column: rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,3
Function: Display the Control Panel-Add/Remove Programs-Startup disk panel.
Command column: Rundll32.exe syncui.dll,briefcase_create
Function: Create a new "My Briefcase" on the desktop.
Command column: Rundll32.exe Diskcopy.dll,diskcopyrundll
Function: Display copy soft disk window
Command column: rundll32.exe apwiz.cpl,newlinkhere%1
Function: Displays the Create Shortcut dialog box, where the location of the shortcut is determined by the%1 parameter.
Command column: rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,0
Features: Displays the Date and Time Options window.
Command column: rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,1
Features: Displays the Time Zone Options window.
Command column: Rundll32.exe rnaui.dll,rnadial [Name of a dial-up connection]
Function: Displays a dial-up window for a dial-up connection. If you have a dial-up connection, display the current Connection Status window.
Command column: Rundll32.exe Rnaui.dll,rnawizard
Features: Displays a window for the New Dial-up Connection Wizard.
Command column: rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0
Features: Displays the show Properties-background option window.
Command column: rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1
Features: Displays the Display Properties-screen Protection option window.
Command column: rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,2
Features: Displays the Display Properties-appearance Options window.
Command column: rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,3
Features: Displays the Display Properties-Properties Option window.
Command column: Rundll32.exe shell32.dll,shhelpshortcuts_rundll fontsfolder
Features: Displays the Windows font file folder.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @3
Features: The same is the font folder that displays Windows.
Command column: Rundll32.exe shell32.dll,shformatdrive
Features: Displays the formatted Soft Disc dialog box.
Command column: rundll32.exe shell32.dll,Control_RunDLL joy.cpl,,0
Function: Display the Control Panel-game controller-General Options window.
Command column: rundll32.exe shell32.dll,Control_RunDLL joy.cpl,,1
Function: Display the Control Panel-game controller-Advanced Options window.
Command columns: rundll32.exe mshtml.dll,printhtml (HTML document)
Function: Print HTML document.
Command column: rundll32.exe shell32.dll,Control_RunDLL mlcfg32.cpl
Features: Displays the Microsoft Exchange General Options window.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @0
Features: Displays the Control Panel-mouse option.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @1
Features: Displays the Control Panel-keyboard Properties-speed Option window.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @1,,1
Features: Displays the Control Panel-Keyboard Properties-language Option window.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @2
Features: Displays the Windows Print Machine folder.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @3
Features: Displays the Windows Fonts folder.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @4
Function: Display the Control Panel-Input Method Properties-Input Method Options window.
Command column: rundll32.exe shell32.dll,Control_RunDLL modem.cpl,,add
Function: Perform the Add New Modem wizard.
Command column: rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,0
Function: Displays the Control Panel-Multimedia Properties-Audio property page.
Command column: rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,1
Features: Displays the Control Panel-multimedia Properties-video property page.
Command column: rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,2
Features: Displays the Control Panel-Multimedia Properties-midi property page.
Command column: rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,3
Features: Displays the Control Panel-multimedia Properties-CD Music property page.
Command column: rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,4
Features: Displays the Control Panel-Multimedia Properties-Devices property page.
Command column: rundll32.exe shell32.dll,control_rundll mmsys.cpl @1
Features: Displays the Control Panel-Sound Options window.
Command column: rundll32.exe shell32.dll,Control_RunDLL netcpl.cpl
Features: Displays the Control Panel-Network Options window.
Command column: rundll32.exe shell32.dll,Control_RunDLL odbccp32.cpl
Features: Displays the ODBC32 Data Management Options window.
Command column: Rundll32.exe shell32.dll,openas_rundll {drive:\path\filename}

Features: Displays the Open With dialog box for the specified file (drive:\path\filename).
Command column: rundll32.exe shell32.dll,Control_RunDLL password.cpl
Function: Displays the Control Panel-Password Option window.
Command column: rundll32.exe shell32.dll,Control_RunDLL powercfg.cpl
Features: Displays the Control Panel-Power Management Properties Option window.
Command column: Rundll32.exe shell32.dll,shhelpshortcuts_rundll printersfolder
Features: Displays the Windows Print Machine folder. (with rundll32.exe shell32.dll,Control_RunDLL main.cpl @2)
Command column: rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,0
Features: Displays the Control Panel-Regional Settings Properties-Regional Settings Options window.
Command column: rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,1
Function: Displays the Control Panel-locale Properties-number Option window.
Command column: rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,2
Features: Displays the Control Panel-Regional Settings Properties-currency Option window.
Command column: rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,3
Features: Displays the Control Panel-locale Properties-time Option window.
Command column: rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,4
Features: Displays the Control Panel-locale Properties-date Option window.
Command column: rundll32.exe desk.cpl,installscreensaver [Screen protection file name]
Function: Sets the specified screen protection file to Windows screensaver and displays the Screen Protection Properties window.
Command column: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,0
Function: Displays the Control Panel-System Properties-legacy Properties window.
Command column: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,1
Function: Displays the Control Panel-System Properties-Device Manager Properties window.
Command column: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,2
Function: Displays the Control Panel-System Properties-Hardware profile Properties window.
Command column: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,3
Function: Displays the Control Panel-System Properties-performance Properties window.
Command column: Rundll32.exe user.exe,restartwindows
function: Forcibly shut down all programs and reboot the machine.
Command column: Rundll32.exe user.exe,exitwindows
function: Forcibly shut down all programs and shut down the machine.
Command column: rundll32.exe shell32.dll,Control_RunDLL telephon.cpl
Features: Display the Dialing Properties option window
Command column: rundll32.exe shell32.dll,Control_RunDLL themes.cpl
Features: Display the desktop theme Options panel
Of course, more than just VisualBasic, such as delphi.visualc++ and other programming languages can call the external command method to use the rundll of these functions, the specific method here is no longer described in detail. Flexible use of rundll, will make your program design lightly loose, to achieve a multiplier effect!

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.