旧文存档
昨天没事去SAO Utils主页上闲逛的时候,恰好看到有人问如何实现Win+L
顺手搜了一下,原来是这样……
以下引用自
http://www.technipages.com/windows-7-vista-rundll32-shortcut-commands.html
Windows 7/Vista RUNDLL32 Shortcut Commands
by Mitch
in Windows
Here is a list of RUNDLL32 shortcuts that can be used in Windows 7 and Vista. I love these shortcuts. I use them all the time to create shortcut icons for my users or when creating batch files.
Hold down the Windows key and press R to bring up the run box, then type one of the following commands.
Add/Remove Programs
RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0
Content Advisor
RunDll32.exe msrating.dll,RatingSetupUI
Control Panel
RunDll32.exe shell32.dll,Control_RunDLL
Date and Time Properties
RunDll32.exe shell32.dll,Control_RunDLL timedate.cpl
Display Settings
RunDll32.exe shell32.dll,Control_RunDLL access.cpl,,3
Device Manager
RunDll32.exe devmgr.dll DeviceManager_Execute
Folder Options – File Types
RunDll32.exe shell32.dll,Control_Options 2
Folder Options – General
RunDll32.exe shell32.dll,Options_RunDLL 0
Folder Options – Search
RunDll32.exe shell32.dll,Options_RunDLL 2
Folder Options – View
RunDll32.exe shell32.dll,Options_RunDLL 7
Forgotten Password Wizard
RunDll32.exe keymgr.dll,PRShowSaveWizardExW
Hibernate
RunDll32.exe powrprof.dll,SetSuspendState
Keyboard Properties
RunDll32.exe shell32.dll,Control_RunDLL main.cpl @1
Lock Screen
RunDll32.exe user32.dll,LockWorkStation
Mouse Properties
RunDll32.exe shell32.dll,Control_RunDLL main.cpl @0
Map Network Drive
RunDll32.exe shell32.dll,SHHelpShortcuts_RunDLL Connect
Network Connections
RunDll32.exe shell32.dll,Control_RunDLL ncpa.cpl
Power Options
RunDll32.exe Shell32.dll,Control_RunDLL powercfg.cpl
Regional Settings
RunDll32.exe shell32.dll,Control_RunDLL intl.cpl,,3
Stored Usernames and Passwords
RunDll32.exe keymgr.dll,KRShowKeyMgr
System Properties: Advanced
RunDll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,4
System Properties: Automatic Updates
RunDll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,5
Taskbar Properties
RunDll32.exe shell32.dll,Options_RunDLL 1
User Accounts
RunDll32.exe shell32.dll,Control_RunDLL nusrmgr.cpl
Windows Security Center
RunDll32.exe shell32.dll,Control_RunDLL wscui.cpl
Windows – About
RunDll32.exe SHELL32.DLL,ShellAboutW
Unplug/Eject Hardware
RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll
Windows Firewall
RunDll32.exe shell32.dll,Control_RunDLL firewall.cpl
Wireless Network Setup
RunDll32.exe shell32.dll,Control_RunDLL NetSetup.cpl,@0,WNSW
以及更多的链接。
http://www.winvistaclub.com/t57.html
http://www.walkernews.net/2007/06/06/quick-start-to-rundll32-syntax-and-example/
http://www.lockergnome.com/oztech/2007/11/15/shortcut-commands-to-clear-internet-explorer-tracks/
http://www.dx21.com/SCRIPTING/RUNDLL32/REFGUIDE.ASP?ISF=0&P=A
上面提到了Hibernate
但是比如我自己家的win7是开启混合睡眠的,每次都是Sleep,
那么,有没有什么办法用这种方式Sleep呢。
答案是NO。
无法仅用一行rundll32睡眠。
以下引自
http://blog.csdn.net/yisikaipu/article/details/6593536
讹传的Win7睡眠(待机)快捷方式“rundll32.exe powrprof.dll,SetSuspendState 0,1,0”
分类: SetSuspendState 休眠 睡眠 待机 快捷方式 2011-07-11 11:58 1238人阅读 评论(5) 收藏 举报
1,SetSuspendState不是为rundll32设计的。无法仅用一行rundll32睡眠。可以先取消休眠选项……,那是另话。
2,想仅用一行rundll32休眠,如下即可,不必带参数。
rundll32.exe powrprof.dll,SetSuspendState
如下煞有介事的写法,也是臆想的:
rundll32.exe powrprof.dll,SetSuspendState Hibernate
rundll32.exe powrprof.dll,SetSuspendState Sleep
解释机理:
SetSuspendState函数:http://msdn.microsoft.com/en-us/library/aa373201(v=vs.85).aspx
BOOL WINAPI SetSuspendState(BOOL Hibernate,BOOL ForceCritical,BOOL DisableWakeEvent);
简而言之,第一个参数为TRUE,则休眠。为FALSE,则睡眠(待机)。
rundll32接受的函数原型:http://support.microsoft.com/kb/q164787/
void CALLBACK EntryPoint(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);
运行rundll32时,一个进程被开启,该进程(的线程)创建一个隐藏的窗口,该窗口句柄(不会为0)做为第一个参数被传入所调用的函数。讹传的“0,1,0”,是做为第三个参数的。
如果原型不符合,rundll32就生搬硬套,于是:
SetSuspendState((BOOL)hwnd, (BOOL)hinst, (BOOL)"0,1,0");
因为第一个参数总是被转换为TRUE,所以总是休眠。因为第二、三个参数也总是被转换为TRUE,所以只有一个结果。
收藏于 2013-05-25
来自于百度空间