不考虑工具的话可以自建桌面右键菜单
提供两种息屏调用方式:
[Asm] - cmd.exe /c powershell (Add-Type '[DllImport("user32.dll")]^public static extern int PostMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)
复制代码
[Asm] - cmd.exe /C powershell (Add-Type '[DllImport("user32.dll")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)
复制代码
注册表
[Asm] - Windows Registry Editor Version 5.00
- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Item23]
- "MUIVerb"="一键熄屏(PostMessage)(&Z)"
- "Icon"="%SystemRoot%\\System32\\shell32.dll,174"
- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Item23\command]
- @="cmd.exe /c powershell (Add-Type '[DllImport(\\"user32.dll\\")]^public static extern int PostMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)"
复制代码
[Asm] - Windows Registry Editor Version 5.00
- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Item24]
- "MUIVerb"="一键熄屏(SendMessage)"
- "Icon"="%SystemRoot%\\System32\\shell32.dll,174"
- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Item24\command]
- @="cmd.exe /C powershell (Add-Type '[DllImport(\\"user32.dll\\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)"
复制代码
一键熄屏(SendMessage):http://4275.com/sugdh4
一键熄屏(PostMessage)(&Z):http://4275.com/rzd1tv |