How to lock Windows systems and invoke other System dialog boxes

Source: Internet
Author: User
Tags intl locale

This question comes from the forum question, the original question is how realizes the win+l effect. The first reaction is to simulate the button, in fact, the development of people should not come up with this idea, it is not possible to consider through the key to solve.

The resolution code is as follows:

Using System;
Namespace ConsoleApplication2 ...
{
class program
... {
static void Main (string[] args)
...      {
System.Diagnostics.Process p = new System.Diagnostics.Process ();
P.startinfo.workingdirectory = System.Environment.GetFolderPath (Environment.SpecialFolder.System);
p.StartInfo.FileName = "Rundll32.exe";
p.startinfo.arguments = "User32.dll,lockworkstation";
P.start ();
}
}

In addition, other system dialogs, including command format references, can be invoked by calling Rundll32:

Command column: rundll32.exe user.exe,restartwindows function: System reboot command column: rundll32.exe user.exe,exitwindows function: Turn off system command: Rundll32.exe. Command column: rundll32.exe user.exe,restartwindows function: System reboot command column: rundll32.exe user.exe,exitwindows function: Turn off system command: rundll32.exe shell32.dll,Control_RunDLL function: Display Control Panel command column: rundll32.exe shell32.dll,control_rundll access.cpl,,1 function: Display "Control Panel-Auxiliary options-Keyboard" Options window command column: rundll32.exe shell32.dll,control_rundll access.cpl,,2 function: Display the Control Panel-Accessibility-Sounds Option Window command column: rundll32.exe shell32.dll, Control_RunDLL access.cpl,,3 function: Display the Control Panel-Accessibility-Display Options window command column: rundll32.exe shell32.dll,control_rundll access.cpl,,4 Feature: Display Control Panel-Accessibility-Mouse Options window command column: rundll32.exe shell32.dll,control_rundll access.cpl,,5 Feature: Display the Control Panel-Accessibility-Legacy Options window command columns:
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 columns: rundll32.exe shell32.dll,control_rundll appwiz.cpl,,1 Feature: Display the Control Panel-Add/Remove Programs-install/uninstall panel. Command column: rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,2 function: 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-boot disk panel.
Command column: Rundll32.exe syncui.dll,briefcase_create feature: Create a new "My Briefcase" on the desktop. Command columns: rundll32.exe diskcopy.dll,diskcopyrundll features: displaying copy floppy Windows command columns: Rundll32.exe apwiz.cpl,newlinkhere%1 Feature: Display the Create Shortcut dialog box
, the location of the shortcut that is established is determined by the%1 parameter.
Command column: rundll32.exe shell32.dll,control_rundll timedate.cpl,,0 Feature: Displays the date and Time Options window.
Command column: rundll32.exe shell32.dll,control_rundll timedate.cpl,,1 Feature: Displays the Time Zone option window. Command column: Rundll32.exe rnaui.dll,rnadial [Name of a dial-up connection] feature: A dial-up window that displays a dial-up connection.
If you have a dial-up connection, display the current Connection Status window.
Command column: Rundll32.exe rnaui.dll,rnawizard feature: Displays the window for the New Dial-up Connection Wizard.
Command column: rundll32.exe shell32.dll,control_rundll desk.cpl,,0 feature: Displays the show Properties-background option window.
Command column: rundll32.exe shell32.dll,control_rundll desk.cpl,,1 Feature: Displays the Display Properties-screen Protection option window.
Command column: rundll32.exe shell32.dll,control_rundll desk.cpl,,2 feature: Displays the show Properties-appearance option window.
Command column: rundll32.exe shell32.dll,control_rundll desk.cpl,,3 Feature: Displays the Display Properties-Properties Option window. Command column: Rundll32.exe shell32.dll,shheLpshortcuts_rundll fontsfolder Feature: Displays the Fonts folder for Windows.
Command columns: rundll32.exe shell32.dll,control_rundll main.cpl @3 feature: The same font folder that displays Windows.
Command column: Rundll32.exe shell32.dll,shformatdrive feature: Displays the formatted Soft Disk 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 Feature: Display the Control Panel-game controller-Advanced Options window.
Command column: rundll32.exe mshtml.dll,printhtml (HTML document) feature: Print HTML document.
Command column: rundll32.exe shell32.dll,control_rundll mlcfg32.cpl Feature: Displays the Microsoft Exchange General Options window.
Command columns: rundll32.exe shell32.dll,control_rundll main.cpl @0 function: Display the Control Panel-mouse option.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @1 function: Display the Control Panel-keyboard Properties-speed Option window.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @1,,1 function: Display the Control Panel-Keyboard Properties-language Option window.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @2 feature: Displays the Windows printer folder.
Command column: rundll32.exe shell32.dll,control_rundll main.cpl @3 feature: Displays the Windows Fonts folder. Command column: rundll32.exe shell32.dll,control_rundll main.cpl @4 function: Display control Panel-Input Method Properties-IMEOption 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 Feature: Displays the Control Panel-Multimedia Properties-Audio property page.
Command column: rundll32.exe shell32.dll,control_rundll mmsys.cpl,,1 Feature: Displays the Control Panel-multimedia Properties-video property page.
Command column: rundll32.exe shell32.dll,control_rundll mmsys.cpl,,2 Feature: Displays the Control Panel-Multimedia Properties-midi property page.
Command column: rundll32.exe shell32.dll,control_rundll mmsys.cpl,,3 Feature: Displays the Control Panel-multimedia Properties-CD Music property page.
Command column: rundll32.exe shell32.dll,control_rundll mmsys.cpl,,4 Feature: Displays the Control Panel-Multimedia Properties-Devices property page.
Command column: rundll32.exe shell32.dll,control_rundll mmsys.cpl @1 function: Display the Control Panel-Sound Option window.
Command column: rundll32.exe shell32.dll,control_rundll netcpl.cpl function: Display the Control Panel-Network Option window.
Command column: rundll32.exe shell32.dll,control_rundll odbccp32.cpl Feature: Display ODBC32 Data management Options window.
Command column: rundll32.exe shell32.dll,openas_rundll {drive:path ilename} feature: Displays the Open With dialog box for the specified file (Drive:path ilename).
Command column: rundll32.exe shell32.dll,control_rundll password.cpl function: Display the Control Panel-Password Option window. Command column: rundll32.exe shell32.dll,control_rundll powercfg.cpl function: Display "controlPanel-Power Management Properties Option window. Command column: rundll32.exe shell32.dll,shhelpshortcuts_rundll printersfolder Feature: Displays the Windows printer folder. (Same rundll32.exe shell32.dll,control_rundll main.cpl @2) command columns: Rundll32.exe shell32.dll,control_rundll intl.cpl,,0 Features: Display "
Control Panel-Regional Settings Properties-Regional Settings Options window.
Command column: rundll32.exe shell32.dll,control_rundll intl.cpl,,1 Feature: Displays the Control Panel-locale Properties-number Option window.
Command column: rundll32.exe shell32.dll,control_rundll intl.cpl,,2 Feature: Display the Control Panel-locale Properties-currency Option window.
Command column: rundll32.exe shell32.dll,control_rundll intl.cpl,,3 function: Displays the Control Panel-locale Properties-time Option window.
Command column: rundll32.exe shell32.dll,control_rundll intl.cpl,,4 Feature: Displays the Control Panel-locale Properties-date Option window.
Command column: rundll32.exe desk.cpl,installscreensaver [screen protected file name] feature: 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 Feature: 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 Property window. Command column: rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,3 function: Display the Control Panel-System Properties-performance Properties window.
Command column: rundll32.exe user.exe,restartwindows function: Force shut down all programs and reboot the machine.
Command column: rundll32.exe user.exe,exitwindows function: Force shutdown of all programs and shutdown. Command columns: rundll32.exe shell32.dll,control_rundll telephon.cpl feature: Display the Dialing Properties Option Window command column: Rundll32.exe Shell32.dll,control_ Rundll themes.cpl Feature: Display the desktop theme Options panel
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.