read.cash Log in
@effgee more from that month

Useful Windows Hacks - Turn off Monitor / Screen from .bat file

With the following "code" you can create a shortcut on your desktop (or wherever) and shut off your monitor with a double click. TurnOffScreen.bat 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) Copy the above code into a text editor and save it with the .bat file extension. As you can see it is a PowerShell command, and can also be used as a PowerShell script. I use this code to quickly shut off my screen when I want to go to sleep.

No comments yet

Log in to join in Reading is open to everyone. Replying needs an account.