Use rundll32.exe and rundll.exe

zhaozj2021-02-08  199

Fuzhou Pasic

Frequently Windows9x friends must have two files that rundll32.exe and rundll.exe

It will be unfamiliar, but because the functions of these two programs are originally limited to internal use in Microsoft, they are truly

I know how to use them. So good, if you are still unclear, then

Let me tell you.

First, please do a small experiment (please save the results of the program you are running in advance, otherwise ...):

Click "Start-Program-MS-DOS Mode" to enter the DOS window, then type

"Rundll32.exe User.exe, RestartWindows", then press Enter, then you will see, machine

The device is restarted! How is it, is it very interesting?

Of course, Rundll's function is more than just restarting your machine. In fact, Rundll, as the name suggests,

Running the DLL, its function is to call the Windows dynamic link library by command line.

The difference between Rundll32.exe and Rundll.exe is that the former is a link library that calls 32-bit, and the latter is transport

For 16-bit link libraries, their command format is:

Rundll.exe, ,

Here you should pay attention to three points: 1. DLL file name cannot contain spaces, such as the file is located

C: / program files / directory, you have to change this path to C: / Progra ~ 1 /; 2.DLL file name and DLL

The comma between the entry points cannot be small, otherwise the program will be wrong and will not give any information! 3. This is the most important

One point: Rundll cannot be used to call DLL containing return value parameters, such as getUserName () in Win32API,

GetTextFace (), etc. In Visual Basic, a directive shell, a handle

The formula is:

Shell "Command Line"

If you can use Rundll32.exe to use the shell directive, you will make your VB program have other methods.

Even if it is unable to achieve: still use it as an example, the traditional method requires you to build one in the VB project.

A module and then written to the declaration of WinAPI, and finally you can call it in the program. And now just one sentence:

Shell "Rundll32.exe User.exe, RestartWindows" is set! Is it convenient?

too much?

In fact, Rundll32.exe has unique in calling various Windows control panels and system options.

The advantages. Below, I will listed the Rundll's instructions collected on the Internet (very

Used, you can save a lot of time to call the Windows API! ! ) For everyone to quote in programming:

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 - Auxiliary Options - Keyboard" option window

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

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

Command line: Rundll32.exe shell32.dll, control_rundll access.cpl, 3 function: Display "Control Panel - Auxiliary Options - Display" option window

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

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

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

Function: Display "Control Panel - Auxiliary Options - General" Options Window

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

Function: Run the Control Panel - Add New Hardware wizard.

Command line: rundll32.exe shell32.dll, shhelpshrtcuts_rundll addprinter

Function: Run the Control Panel - Add New Printer Wizard.

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

Function: Displays the 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: Displays the 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 window

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

Function: Displays the "Create Shortcut" dialog that is determined by% 1 parameter from the location of the shortcut.

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

Function: Displays the Date and Time option window.

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

Function: Displays the Time Zone option window.

Command line: 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 dial-up, the window of the current connection status is displayed.

Command line: rundll32.exe rnaui.dll, Rnawizard

Function: Displays the Window of the New Dial-up Connection wizard.

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

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

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

Function: Displays the "Display Properties - Screen Protection" option window.

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

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

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

Function: Displays the Display Properties - Properties option window.

Command line: rundll32.exe shell32.dll, shhelpshrtcuts_rundll fontsfolder feature: Displays the "Font" folder of Windows.

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

Function: The "Font" folder that is also displayed in Windows.

Command line: rundll32.exe shell32.dll, shformatdrive

Function: Displays the Format Soft Disk dialog.

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

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

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

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

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

Function: Print the HTML document.

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

Function: Displays the Microsoft Exchange General Options window.

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

Function: Displays the Control Panel - Mouse option.

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

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

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

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

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

Function: Displays the Windows "Printer" folder.

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

Function: Displays the Windows "Font" folder.

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

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

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

Function: Run the Add New Modem wizard.

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

Function: Displays the Control Panel - Multimedia Properties - Audio property page.

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

Function: Displays the Control Panel - Multimedia Properties - Video property page.

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

Function: Displays the Control Panel-Multimedia Properties-MIDI property page.

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

Function: Displays the Control Panel-Multimedia Properties-CD Music property page.

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

Function: Displays the Control Panel - Multimedia Properties - Device property page. Command line: rundll32.exe shell32.dll, control_rundll mmsys.cpl @ 1

Function: Displays the "Control Panel - Sound" option window.

Command line: rundll32.exe shell32.dll, control_rundll Netcpl.cpl

Function: Displays the Control Panel - Network option window.

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

Function: Displays the ODBC32 Data Management Options window.

Command line: rundll32.exe shell32.dll, openas_rundll {drive: / path / filename}

Function: Displays the "Open Mode" dialog box for the specified file (Drive: / Path / filename).

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

Function: Displays the Control Panel - Password option window.

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

Function: Displays the Control Panel - Power Management Properties option window.

Command line: rundll32.exe shell32.dll, shhelpshrtcuts_rundll printersfolder

Function: Displays the Windows "Printer" folder. (With rundll32.exe shell32.dll, control_rundll main.cpl @ 2)

Command line: rundll32.exe shell32.dll, control_rundll INTL.CPL, 0

Function: Displays the Control Panel - Zone Setting Properties - Region Settings window.

Command line: rundll32.exe shell32.dll, control_rundll INTL.CPL, 1

Function: Displays the Control Panel - Region Setting Properties - Number option window.

Command line: rundll32.exe shell32.dll, control_rundll INTL.CPL, 2

Function: Displays the Control Panel - Region Setting Properties - Currency option window.

Command line: rundll32.exe shell32.dll, control_rundll INTL.CPL, 3

Function: Displays the Control Panel - Zone Setting Properties - Time option window.

Command line: rundll32.exe shell32.dll, control_rundll INTL.CPL, 4

Function: Displays the Control Panel - Region Setting Properties - Date option window.

Command line: rundll32.exe desk.cpl, installscreensaver [screen protection file name]

Function: Set the specified screen saver file to Windows screen, and display the screen protection properties window.

Command line: rundll32.exe shell32.dll, control_rundll sysdm.cpl, 0

Function: Displays the Control Panel-System Properties-General properties window.

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

Function: Displays the Control Panel-System Properties-Device Manager property window.

Command line: rundll32.exe shell32.dll, control_rundll sysdm.cpl, 2

Function: Displays the Control Panel-System Properties-Hardware Profile Properties window.

Command line: rundll32.exe shell32.dll, control_rundll sysdm.cpl, 3

Function: Displays the Control Panel-System Properties-Performance property window. Command line: Rundll32.exe User.exe, RestartWindows

Function: Forcibly close all programs and restart the machine.

Command line: Rundll32.exe User.exe, ExitWindows

Function: Forcibly shut down all programs and shut down.

Command line: rundll32.exe shell32.dll, control_rundll telephon.cpl

Function: Display "Dial Properties" option window

Command line: rundll32.exe shell32.dll, control_rundll themes.cpl

Function: Show "Desktop Topic" option panel

Of course, not only VisualBasic, like Delphi.visualc , etc. can also pass

The method of calling external commands is used to use these functions of Rundll, and the specific method is no longer detailed here.

. Flexible use of Rundll, you will make your programming easily, reach the effect of halving!

Take the above content from "Programming Technology"

转载请注明原文地址:https://www.9cbs.com/read-2572.html

New Post(0)