First, please do a small experiment (please save the results of the program you are executing in advance):
Click "Start - Program - Ms - Dos Method", enter the Dos window, then type " , restart windows", and press Enter, and you will see that the machine has been restarted!
Of course, Rundll's function is not just about restarting your machine. In fact, Rundll, as the name suggests, executes Dll, its function is to call Windows' dynamic link library in the form of a command column. The difference is that the former is a 32-bit link library, while the latter is a 16-bit link library, and their command format is:
,,
Three things to note here:
The file name cannot contain spaces. For example, the file is located in the c:Program Files directory. You need to change this path to c:Progra~1;
There must be no commas between the file name and the Dll entry point, otherwise the program will make an error and no information will be given!
3. This is the most important point: Rundll cannot be used to call Dll with return value parameters, such as GetUserName(), GetTextFace(), etc. in Win32API.
In Visual Basic, a shell is provided to execute external programs, the format is:
Shell "Command Column"
If you can use the Shell instructions well, your VB program will have effects that are difficult or even impossible to achieve with other methods: Take restart as an example. The traditional method requires you to first build a module in the VB project, then write the WinAPI statement, and finally call in the program. And now only one sentence:
Shell " , restart windows" is done!
In fact, there are unique advantages in calling various Windows control panels and system options.
Command column: ,Control_RunDLL
Function: Display the control panel
Command column: ,Control_RunDLL ,,1
Function: Display the "Control Panel-Assistance Options-Keyboard" option window
Command column: ,Control_RunDLL ,,2
Function: Display the "Control Panel-Assistance Options-Sound" option window
Command column: ,Control_RunDLL ,,3
Function: Display the "Control Panel-Assistance Options-Display" option window
Command column: ,Control_RunDLL , 4
Function: Display the "Control Panel-Assistance Options-Mouse" option window
Command column: ,Control_RunDLL , 5
Function: Display the "Control Panel - Auxiliary Options - Traditional" option window
Command column: ,Control_RunDLL @1
Function: Execute the Control Panel - Add New Hardware wizard.
Command column: ,SHHelpShortcuts_RunDLL AddPrinter
Function: Execute the Control Panel - Add New Printer wizard.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Control Panel-Add/Remove Programs-Installation/Uninstall" panel.
Command column: ,Control_RunDLL ,,2
Function: Displays the "Control Panel-Add/Remove Programs-Installation Windows" panel.
Command column: ,Control_RunDLL ,,3
Function: Displays the "Control Panel-Add/Remove Programs-Startup Disk" panel.
Command column: ,Briefcase_Create
Features: Create a new "My Briefcase" on the desktop.
Command column: ,DiskCopyRunDll
Function: Display the copy disk window
Command column: ,NewLinkHere %1
Function: Display the dialog box of "Create Shortcut" and the position of the created shortcut is determined by the %1 parameter.
Command column: ,Control_RunDLL ,,0
Function: Displays the "Date and Time" option window.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Time Zone" option window.
Command column: ,RnaDial [name of a dial-up connection]
Function: Displays the dialing window for a dialing connection. If the connection is already dialed, the window for the current connection status is displayed.
Command column: ,RnaWizard
Function: Displays the window of the New Dial-up Connection wizard.
Command column: ,Control_RunDLL ,,0
Function: Display the "Show Properties - Background" option window.
Command column: ,Control_RunDLL ,,1
Function: Display the "Display Properties - Screen Protection" option window.
Command column: ,Control_RunDLL ,,2
Function: Display the "Show Properties - Appearance" option window.
Command column: ,Control_RunDLL ,,3
Function: Display the "Show Properties - Properties" option window.
Command column: ,SHHelpShortcuts_RunDLL FontsFolder
Function: Displays the "Font" folder for Windows.
Command column: ,Control_RunDLL @3
Function: Also displays the "Font" folder of Windows.
Command column: ,SHformatDrive
Function: Display the Format Soft Disk dialog box.
Command column: ,Control_RunDLL ,,0
Function: Displays the "Control Panel - Game Controller - General" option window.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Control Panel-Game Controller-Advanced" option window.
Command column: ,PrintHTML (HTML document)
Function: Print HTML document.
Command column: ,Control_RunDLL
Function: Displays the Microsoft Exchange general options window.
Command column: ,Control_RunDLL @0
Function: Displays the "Control Panel-Mouse" option.
Command column: ,Control_RunDLL @1
Function: Displays the "Control Panel-Keyboard Properties-Speed" option window.
Command column: ,Control_RunDLL @1,,1
Function: Displays the "Control Panel-Keyboard Properties-Language" option window.
Command column: ,Control_RunDLL @2
Function: Displays the Windows Printer Folder.
Command column: ,Control_RunDLL @3
Function: Displays the Windows Fonts folder.
Command column: ,Control_RunDLL @4
Function: Display the "Control Panel - Input Method Properties - Input Method" option window.
Command column: ,Control_RunDLL ,,add
Function: Perform the Add New Modem wizard.
Command column: ,Control_RunDLL ,,0
Function: Displays the "Control Panel-Multimedia Properties-Audio" property page.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Control Panel-Multimedia Properties-Video" property page.
Command column: ,Control_RunDLL ,,2
Function: Display the "Control Panel-Multimedia Properties-MIDI" property page.
Command column: ,Control_RunDLL ,,3
Function: Display the "Control Panel-Multimedia Properties-CD Music" property page.
Command column: ,Control_RunDLL , 4
Function: Displays the "Control Panel-Multimedia Properties-Device" property page.
Command column: ,Control_RunDLL @1
Function: Displays the Control Panel-Sound option window.
Command column: ,Control_RunDLL
Function: Displays the "Control Panel-Network" option window.
Command column: ,Control_RunDLL
Function: Display the ODBC32 data management options window.
Command column: ,OpenAs_RunDLL
Function: Displays the "Open With" dialog box for the specified file (driveath ilename).
Command column: ,Control_RunDLL
Function: Displays the "Control Panel-Password" option window.
Command column: ,Control_RunDLL
Function: Displays the "Control Panel - Power Management Properties" option window.
Command column: ,SHHelpShortcuts_RunDLL
PrintersFolder
Function: Displays the Windows Printer Folder. (Same as ,Control_RunDLLmain.cpl @2)
Command column: ,Control_RunDLL ,,0
Function: Displays the "Control Panel - Regional Settings Properties - Regional Settings" option window.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Control Panel - Regional Settings Properties - Numbers" option window.
Command column: ,Control_RunDLL ,,2
Function: Displays the "Control Panel - Regional Settings Properties - Currency" option window.
Command column: ,Control_RunDLL ,,3
Function: Displays the "Control Panel - Regional Settings Properties - Time" option window.
Command column: ,Control_RunDLL , 4
Function: Displays the "Control Panel - Regional Settings Properties - Date" option window.
Command column: InstallScreenSaver [Flow screen protection file name]
Function: Set the specified screen protection file to the Windows screen saver and display the screen protection properties window.
Command column: ,Control_RunDLL ,,0
Function: Displays the "Control Panel - System Properties - Traditional" attribute window.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Control Panel - System Properties - Device Manager" property window.
Command column: ,Control_RunDLL ,,2
Function: Displays the "Control Panel - System Properties - Hardware Configuration Archives" property window.
Command column: ,Control_RunDLL ,,3
Function: Displays the "Control Panel - System Properties - Performance" attribute window.
Command column: , restartwindows
Function: Force shut down all programs and restart the machine.
Command column: ,exitwindows
Function: Forcefully close all programs and shut down.
Command column: ,Control_RunDLL
Function: Display the "Dial Properties" option window
Command column: ,Control_RunDLL
Function: Display the Desktop Keywords option panel
Of course, not only Visual Basic, but other programming languages such as ++ can also use these functions of Rundll by calling external commands. The specific methods will not be described in detail here. Flexible use of Rundll will definitely make your programming easy and achieve twice the result with half the effort!
<Shutdown Shortcut>
(1). Right-click on the blank position of the desktop -> <New> -> Select <Shortcut>
(2). Type exit windows in <directive line>
(3). Type <Close Window> or the name you want in <Select Shortcut> in <Select Shortcut>
<Restart shortcut>
(1). Repeat the above (1)
(2). Type restartwindowsexec in <directive line>
(3). Type <Restart Restart> or the name you want in <Finish> in <Select the name of the shortcut> Press <Finish> RUN -> cmd or command
Click "Start - Program - Ms - Dos Method", enter the Dos window, then type " , restart windows", and press Enter, and you will see that the machine has been restarted!
Of course, Rundll's function is not just about restarting your machine. In fact, Rundll, as the name suggests, executes Dll, its function is to call Windows' dynamic link library in the form of a command column. The difference is that the former is a 32-bit link library, while the latter is a 16-bit link library, and their command format is:
,,
Three things to note here:
The file name cannot contain spaces. For example, the file is located in the c:Program Files directory. You need to change this path to c:Progra~1;
There must be no commas between the file name and the Dll entry point, otherwise the program will make an error and no information will be given!
3. This is the most important point: Rundll cannot be used to call Dll with return value parameters, such as GetUserName(), GetTextFace(), etc. in Win32API.
In Visual Basic, a shell is provided to execute external programs, the format is:
Shell "Command Column"
If you can use the Shell instructions well, your VB program will have effects that are difficult or even impossible to achieve with other methods: Take restart as an example. The traditional method requires you to first build a module in the VB project, then write the WinAPI statement, and finally call in the program. And now only one sentence:
Shell " , restart windows" is done!
In fact, there are unique advantages in calling various Windows control panels and system options.
Command column: ,Control_RunDLL
Function: Display the control panel
Command column: ,Control_RunDLL ,,1
Function: Display the "Control Panel-Assistance Options-Keyboard" option window
Command column: ,Control_RunDLL ,,2
Function: Display the "Control Panel-Assistance Options-Sound" option window
Command column: ,Control_RunDLL ,,3
Function: Display the "Control Panel-Assistance Options-Display" option window
Command column: ,Control_RunDLL , 4
Function: Display the "Control Panel-Assistance Options-Mouse" option window
Command column: ,Control_RunDLL , 5
Function: Display the "Control Panel - Auxiliary Options - Traditional" option window
Command column: ,Control_RunDLL @1
Function: Execute the Control Panel - Add New Hardware wizard.
Command column: ,SHHelpShortcuts_RunDLL AddPrinter
Function: Execute the Control Panel - Add New Printer wizard.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Control Panel-Add/Remove Programs-Installation/Uninstall" panel.
Command column: ,Control_RunDLL ,,2
Function: Displays the "Control Panel-Add/Remove Programs-Installation Windows" panel.
Command column: ,Control_RunDLL ,,3
Function: Displays the "Control Panel-Add/Remove Programs-Startup Disk" panel.
Command column: ,Briefcase_Create
Features: Create a new "My Briefcase" on the desktop.
Command column: ,DiskCopyRunDll
Function: Display the copy disk window
Command column: ,NewLinkHere %1
Function: Display the dialog box of "Create Shortcut" and the position of the created shortcut is determined by the %1 parameter.
Command column: ,Control_RunDLL ,,0
Function: Displays the "Date and Time" option window.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Time Zone" option window.
Command column: ,RnaDial [name of a dial-up connection]
Function: Displays the dialing window for a dialing connection. If the connection is already dialed, the window for the current connection status is displayed.
Command column: ,RnaWizard
Function: Displays the window of the New Dial-up Connection wizard.
Command column: ,Control_RunDLL ,,0
Function: Display the "Show Properties - Background" option window.
Command column: ,Control_RunDLL ,,1
Function: Display the "Display Properties - Screen Protection" option window.
Command column: ,Control_RunDLL ,,2
Function: Display the "Show Properties - Appearance" option window.
Command column: ,Control_RunDLL ,,3
Function: Display the "Show Properties - Properties" option window.
Command column: ,SHHelpShortcuts_RunDLL FontsFolder
Function: Displays the "Font" folder for Windows.
Command column: ,Control_RunDLL @3
Function: Also displays the "Font" folder of Windows.
Command column: ,SHformatDrive
Function: Display the Format Soft Disk dialog box.
Command column: ,Control_RunDLL ,,0
Function: Displays the "Control Panel - Game Controller - General" option window.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Control Panel-Game Controller-Advanced" option window.
Command column: ,PrintHTML (HTML document)
Function: Print HTML document.
Command column: ,Control_RunDLL
Function: Displays the Microsoft Exchange general options window.
Command column: ,Control_RunDLL @0
Function: Displays the "Control Panel-Mouse" option.
Command column: ,Control_RunDLL @1
Function: Displays the "Control Panel-Keyboard Properties-Speed" option window.
Command column: ,Control_RunDLL @1,,1
Function: Displays the "Control Panel-Keyboard Properties-Language" option window.
Command column: ,Control_RunDLL @2
Function: Displays the Windows Printer Folder.
Command column: ,Control_RunDLL @3
Function: Displays the Windows Fonts folder.
Command column: ,Control_RunDLL @4
Function: Display the "Control Panel - Input Method Properties - Input Method" option window.
Command column: ,Control_RunDLL ,,add
Function: Perform the Add New Modem wizard.
Command column: ,Control_RunDLL ,,0
Function: Displays the "Control Panel-Multimedia Properties-Audio" property page.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Control Panel-Multimedia Properties-Video" property page.
Command column: ,Control_RunDLL ,,2
Function: Display the "Control Panel-Multimedia Properties-MIDI" property page.
Command column: ,Control_RunDLL ,,3
Function: Display the "Control Panel-Multimedia Properties-CD Music" property page.
Command column: ,Control_RunDLL , 4
Function: Displays the "Control Panel-Multimedia Properties-Device" property page.
Command column: ,Control_RunDLL @1
Function: Displays the Control Panel-Sound option window.
Command column: ,Control_RunDLL
Function: Displays the "Control Panel-Network" option window.
Command column: ,Control_RunDLL
Function: Display the ODBC32 data management options window.
Command column: ,OpenAs_RunDLL
Function: Displays the "Open With" dialog box for the specified file (driveath ilename).
Command column: ,Control_RunDLL
Function: Displays the "Control Panel-Password" option window.
Command column: ,Control_RunDLL
Function: Displays the "Control Panel - Power Management Properties" option window.
Command column: ,SHHelpShortcuts_RunDLL
PrintersFolder
Function: Displays the Windows Printer Folder. (Same as ,Control_RunDLLmain.cpl @2)
Command column: ,Control_RunDLL ,,0
Function: Displays the "Control Panel - Regional Settings Properties - Regional Settings" option window.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Control Panel - Regional Settings Properties - Numbers" option window.
Command column: ,Control_RunDLL ,,2
Function: Displays the "Control Panel - Regional Settings Properties - Currency" option window.
Command column: ,Control_RunDLL ,,3
Function: Displays the "Control Panel - Regional Settings Properties - Time" option window.
Command column: ,Control_RunDLL , 4
Function: Displays the "Control Panel - Regional Settings Properties - Date" option window.
Command column: InstallScreenSaver [Flow screen protection file name]
Function: Set the specified screen protection file to the Windows screen saver and display the screen protection properties window.
Command column: ,Control_RunDLL ,,0
Function: Displays the "Control Panel - System Properties - Traditional" attribute window.
Command column: ,Control_RunDLL ,,1
Function: Displays the "Control Panel - System Properties - Device Manager" property window.
Command column: ,Control_RunDLL ,,2
Function: Displays the "Control Panel - System Properties - Hardware Configuration Archives" property window.
Command column: ,Control_RunDLL ,,3
Function: Displays the "Control Panel - System Properties - Performance" attribute window.
Command column: , restartwindows
Function: Force shut down all programs and restart the machine.
Command column: ,exitwindows
Function: Forcefully close all programs and shut down.
Command column: ,Control_RunDLL
Function: Display the "Dial Properties" option window
Command column: ,Control_RunDLL
Function: Display the Desktop Keywords option panel
Of course, not only Visual Basic, but other programming languages such as ++ can also use these functions of Rundll by calling external commands. The specific methods will not be described in detail here. Flexible use of Rundll will definitely make your programming easy and achieve twice the result with half the effort!
<Shutdown Shortcut>
(1). Right-click on the blank position of the desktop -> <New> -> Select <Shortcut>
(2). Type exit windows in <directive line>
(3). Type <Close Window> or the name you want in <Select Shortcut> in <Select Shortcut>
<Restart shortcut>
(1). Repeat the above (1)
(2). Type restartwindowsexec in <directive line>
(3). Type <Restart Restart> or the name you want in <Finish> in <Select the name of the shortcut> Press <Finish> RUN -> cmd or command