[Share] Let's Talk About Shell functions in detail-you have to read them!

Source: Internet
Author: User
Tags intl

 

This post may be a bit long, but it is definitely worth reading.

What is shell? It is neither a worksheet function nor an API function, nor Shell Oil. It is a built-in function of VBA.
However, it is a vast array of functions that can accommodate n APIs. APIs are application interfaces, while shell is a bridge between applications and systems.
It is easy to use, that is, to execute an executable file. The function is the same as that of the Start Menu.
Shell (pathname [, windowstyle])
Pathname is the name of the program to be executed. It may also include directories or folders.
Windowstyle indicates the window style when the program is running
For more information, see the help of VBA.

# Basic usage
Shell ("C:/program files/Winamp/winamp.exe", 1) provides a path to directly execute an EXE program.

For a Windows program, you can directly enter the program name, for example:
Shell "cmder.exe C:", 1 open drive C.
Shell "control.exe" to open the control panel, or even shell "control"
Shell "control.exe appwiz. Cpl" Open Control Panel-Add/delete programs
Shell "control.exe sysdm. Cpl @ 1" Add new hardware
Shell "control.exe sysdm. Cpl" System
Shell "control.exe appwiz. Cpl" Add/delete programs
Shell "control.exe inetcpl. Cpl" Internet properties
Shell "control.exe intl. Cpl" region settings
Shell "control.exe joy. Cpl" Game Controller
Shell "control.exe main. Cpl" Mouse
Shell "control.exe mmsys. Cpl" Multimedia
Shell "control.exe MODEM. Cpl" Modem
Shell "control.exe netcpl. Cpl" Network
Shell "control.exe password. Cpl" Password
Shell "control.exe powercfg. Cpl" Power Management
Shell "control.exe sticpl. Cpl" scanner and digital camera
Shell "control.exe TimeDate. Cpl" date/time
Shell "control.exe telephon. Cpl" Dial-Up Network
Shell "control.exe odbccp32.cpl" obdc data source Manager
Shell "control.exe desk. Cpl" Display
Shell "calc.exe" Calculator
Shell "mspaint.exe" Drawing
..............

The shell function itself is not powerful, just like Liu Bang, who is under him.
Shell functions
1100000000.exe
CMD can execute almost all the DOS commands, and think about how many commands of DOS can be implemented by shell.
Shell "cmd.exe" opens the CMD window
Shell "cmd.exe/C copy C:/1.txt D:/" copies the 1.txt file of drive C to drive D.
Shell "cmd.exe/c Ping 127.0.0.1" Ping IP
Shell "cmd.exe/C del C:/1.txt" Delete 1.txt
................

There are many other commands that can be viewed by entering help in the CMD window.
What is/C behind cmd?
/C: Execute the specified command in the string and then terminate the command.
/K executes the specified string command but retains
/S modify string processing after/C or/K (see below)
/Q close response
/D stop executing the autorun command from the Registry (see below)
/A converts the output to an internal pipeline or file command to ANSI
/U converts the output to an internal pipeline or file command to Unicode
/T: FG sets the foreground/background color (for details, see color /?)
/E: On enable command extension (see below)/E: Off disable command extension (see below)
/F: Enable file and directory name completion characters on (see below)
/F: off stop file and directory name completion characters (see below)
/V: On uses C as the separator to start the extension of delayed environment variables. For example:
/V: On will allow! VaR! Allowed during execution! VaR! Extension variable VAR.
The VaR syntax extends variables when input, which is different from in a for loop.
/V: Off disables delayed environment extension.

For details, Enter cmd/? In the CMD window /? And press Enter.

2、rundll32.exe
This helper is incredibly powerful.
The so-called rundll, run is run, DLL is a dynamic link library, so its function is to run those that cannot be used as a program
A separate DLL file. Rundll32.exe is used to run 32-bit DLL files. The Windows 98 code is mixed with 16-bit and 32-bit,
Rundll32.exeand rundll.exe are available at the same time. Windows 2000/XP are all NT kernel systems,
The code is pure 32-bit, so there is no rundll.exe program in these two systems.
There are many DLL files in the System32 directory, and each dll contains many command parameters.
Common commands and parameters:
Command: rundll32.exe shell32.dll, control_rundll
Function: Display Control Panel
Command: rundll32.exe shell32.dll, control_rundll access. CPL, 1
Function: displays the "control panel-Auxiliary options-keyboard" option window.
Command: rundll32.exe shell32.dll, control_rundll access. CPL, 2
Function: displays the "control panel-Auxiliary options-sound" option window.
Command: rundll32.exe shell32.dll, control_rundll access. CPL, 3
Function: displays the "control panel-Auxiliary options-display" option window.
Command: rundll32.exe shell32.dll, control_rundll access. CPL, 4
Function: displays the "control panel-secondary options-mouse" option window.
Command: rundll32.exe shell32.dll, control_rundll access. CPL, 5
Function: displays the "control panel-Auxiliary options-traditional" option window.
Command: rundll32.exe shell32.dll, control_rundll sysdm. Cpl @ 1
Function: run the "control panel-add new hardware" Wizard.
Command: rundll32.exe shell32.dll, shhelpshortcuts_rundll addprinter
Function: run the "control panel-add new printer" Wizard.
Command: rundll32.exe shell32.dll, control_rundll appwiz. CPL, 1
Function: the "control panel-Add/delete programs-install/uninstall" panel is displayed.
Command: rundll32.exe shell32.dll, control_rundll appwiz. CPL, 2
Function: the "control panel-Add/delete programs-install Windows" panel is displayed.
Command: rundll32.exe shell32.dll, control_rundll appwiz. CPL, 3
Function: the "control panel-Add/delete programs-boot disk" panel is displayed.
Command: rundll32.exe syncui. dll, briefcase_create
Function: Create a new "My Briefcase" on the desktop ".
Command: rundll32.exe diskcopy. dll, diskcopyrundll
Function: displays the copy floppy disk Window.
Command: rundll32.exe apwiz. CPL, newlinkhere % 1
Function: the "Create shortcut" dialog box is displayed. The location of the created shortcut is determined by the % 1 parameter.
Command: rundll32.exe shell32.dll, control_rundll TimeDate. CPL, 0
Function: displays the "Date and Time" option window.
Command: rundll32.exe shell32.dll, control_rundll TimeDate. CPL, 1
Function: displays the "Time Zone" option window.
Command: rundll32.exe rnaui. dll, rnadial [name of a dial-up connection]
Function: displays the dialing window for a dial-up connection. If a dial-up connection has been established, the current connection status window is displayed.
Command: rundll32.exe rnaui. dll, rnawizard
Function: displays the "new dial-up connection" Wizard window.
Command: rundll32.exe shell32.dll, control_rundll desk. CPL, 0
Function: displays the "show properties-background" option window.
Command: rundll32.exe shell32.dll, control_rundll desk. CPL, 1
Function: the "show properties-Screen Protection" option window is displayed.
Command: rundll32.exe shell32.dll, control_rundll desk. CPL, 2
Function: displays the "show properties-appearance" option window.
Command: rundll32.exe shell32.dll, control_rundll desk. CPL, 3
Function: displays the "show properties-properties" option window.
Command: rundll32.exe shell32.dll, shhelpshortcuts_rundll fontsfolder
Function: display the "font" folder of windows.
Command: rundll32.exe shell32.dll, control_rundll main. Cpl @ 3
Function: displays the "font" folder of windows.
Command: rundll32.exe shell32.dll, shformatdrive
Function: displays the formatting dialog box.
Command: rundll32.exe shell32.dll, control_rundll joy. CPL, 0
Function: displays the "control panel-Game Controller-General" option window.
Command: rundll32.exe shell32.dll, control_rundll joy. CPL, 1
Function: displays the "control panel-game controller-advanced" option window.
Command: rundll32.exe mshtml. dll, printhtml (HTML document)
Function: Print HTML documents.
Command: rundll32.exe shell32.dll, control_rundll ml1_32.cpl
Function: displays the Microsoft Exchange General options window.
Command: rundll32.exe shell32.dll, control_rundll main. Cpl @ 0
Function: displays the "control panel-mouse" option.
Command: rundll32.exe shell32.dll, control_rundll main. Cpl @ 1
Function: displays the "control panel-keyboard properties-speed" option window.
Command: rundll32.exe shell32.dll, control_rundll main. Cpl @ 1, 1
Function: displays the "control panel-keyboard properties-language" option window.
Command: rundll32.exe shell32.dll, control_rundll main. Cpl @ 2
Function: displays the windows "Printer" folder.
Command: rundll32.exe shell32.dll, control_rundll main. Cpl @ 3
Function: display the windows "font" folder.
Command: rundll32.exe shell32.dll, control_rundll main. Cpl @ 4
Function: the "control panel-Input Method properties-Input Method" option window is displayed.
Command: rundll32.exe shell32.dll, control_rundll MODEM. CPL, add
Function: run the Add new modem wizard.
Command: rundll32.exe shell32.dll, control_rundll mmsys. CPL, 0
Function: displays the "control panel-multimedia properties-Audio" property page.
Command: rundll32.exe shell32.dll, control_rundll mmsys. CPL, 1
Function: displays the "control panel-multimedia properties-video" property page.
Command: rundll32.exe shell32.dll, control_rundll mmsys. CPL, 2
Function: displays the "control panel-multimedia properties-Midi" property page.
Command: rundll32.exe shell32.dll, control_rundll mmsys. CPL, 3
Function: displays the "control panel-multimedia properties-CD music" property page.
Command: rundll32.exe shell32.dll, control_rundll mmsys. CPL, 4
Function: displays the "control panel-multimedia properties-devices" property page.
Command: rundll32.exe shell32.dll, control_rundll mmsys. Cpl @ 1
Function: displays the "control panel-sound" option window.
Command: rundll32.exe shell32.dll, control_rundll netcpl. CPL
Function: displays the "control panel-network" option window.
Command: rundll32.exe shell32.dll, control_rundll odbccp32.cpl
Function: displays the odbc32 data management option window.
Command: rundll32.exe shell32.dll, openas_rundll {drive:/path/filename}
Function: displays the "open mode" dialog box for the specified file drive:/path/filename.
Command: rundll32.exe shell32.dll, control_rundll password. CPL
Function: the "control panel-Password" option window is displayed.
Command: rundll32.exe shell32.dll, control_rundll powercfg. CPL
Function: the "control panel-Power Management Properties" option window is displayed.
Command: rundll32.exe shell32.dll, shhelpshortcuts_rundll printersfolder
Function: displays Windows printers ". (Same as rundll32.exe shell32.dll, control_rundll main. Cpl @ 2)
Command: rundll32.exe shell32.dll, control_rundll intl. CPL, 0
Function: the "control panel-region settings properties-region Settings" option window is displayed.
Command: rundll32.exe shell32.dll, control_rundll intl. CPL, 1
Function: the "control panel-region settings properties-numbers" option window is displayed.
Command: rundll32.exe shell32.dll, control_rundll intl. CPL, 2
Function: the "control panel-region settings properties-currency" option window is displayed.
Command: rundll32.exe shell32.dll, control_rundll intl. CPL, 3
Function: the "control panel-region setting property-time" option window is displayed.
Command: rundll32.exe shell32.dll, control_rundll intl. CPL, 4
Function: the "control panel-region settings properties-Date" option window is displayed.
Command: rundll32.exe desk. CPL, installscreensaver [Screen saver file name]
Function: sets the specified screen saver file to Windows Screen Saver and displays the screen saver Properties window.
Command: rundll32.exe shell32.dll, control_rundll sysdm. CPL, 0
Function: displays the "control panel-system properties-traditional" Property Window.
Command: rundll32.exe shell32.dll, control_rundll sysdm. CPL, 1
Function: the "control panel-system properties-Device Manager" Properties window is displayed.
Command: rundll32.exe shell32.dll, control_rundll sysdm. CPL, 2
Function: displays the "control panel-system properties-hardware configuration file" attribute window.
Command: rundll32.exe shell32.dll, control_rundll sysdm. CPL, 3
Function: displays the "control panel-system properties-performance" attribute window.
Command: rundll32.exe user.exe, restartwindows
Function: forcibly shut down all programs and restart the machine.
Command: rundll32.exe user.exe, exitwindows
Function: forcibly shut down all programs and shut down them.
Command: rundll32.exe shell32.dll, control_rundll telephon. CPL
Function: displays the "dial property" option window.
Command: rundll32.exe shell32.dll, control_rundll themes. CPL
Function: displays the desktop theme option panel.
..........
There are a lot more. There are hundreds of parameters in the shell32.dll file. Go to the System32 directory and check the number of DLL files. You will be crazy.
Do you think Microsoft is too BT? haha, Gates is not built, or someone else can be the richest man!

Do you want to know where to view these parameters? Let's look down.
Next, I would like to recommend a pretty good software-exescope. I believe many people have used it.
This software is very small and only 500 K, but it is very powerful. It can analyze and display different information without resource files,
Rewrite the resources of executable files, including (exe, DLL, OCX) and so on, and enjoy the beautiful name of "Software surgical knife.
His purpose can't be solved after three days and three nights. I will briefly introduce it to you. You can search for more content on the Internet.

Major function: Chinese Software
Incredible: Do you think Chinese software is very advanced? Can a small software in a district actually do it? Yes, I cannot.
Second-largest feature: custom software
You can use exists to customize most of the software, including all Windows software, such as IE.
If you feel that a menu, icon, or shortcut key of the software is uncomfortable, you can change it on your own. It can be completely different and personalized.
You can change the QQ level to 50 SUNS (only visible on your own. You can replace penguins with chickens, ducks, and even pig heads.
If you don't like it, you can change it! I am the master of my software!
Third major function: Process DLL, ocx, and other files
You can directly open the DLL or ocx file with exbench and modify it.

Related Article

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.