How to start both workplaces with screen off

Post Reply
Rules
Posts: 1
Joined: Tue Feb 04, 2020 11:37 pm

How to start both workplaces with screen off

Post by Rules » Wed Feb 05, 2020 12:09 am

I need both workplaces to wake from hibernation with screen off
The reason why I need it:
I'm sleeping my PC is near my bed.
It's used via rdp by my mom from another room.
The PC has two aster workplaces (RDP is the third)
So I leave my pc tonight in hibernated state
In the morning my mom enters my bedroom and presses the power button on the PC
I need both monitors (2 workplaces) to stay off until mouse of the corresponding workplace is moved..
Also the PC should wake from hibernation so that it's available via RDP
Currently I've added to the task scheduler the task
Image running .bat file
with the the following contents:
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)
1)It runs only on one workplace that I've added it to
2)It runs too late
----
On the other workplace in the task scheduler the task is not listed And also it doesn't run. Creating task with same name fails as it says "A task with the same name already exists"
----
You may ask me WHY NOT SIMPLY USE MONITORS' POWER BUTTON?!
I'll reply: I'm afraid the buttons won't last long if used twice a day every day...

Youden
Posts: 1
Joined: Wed Sep 20, 2023 5:57 am

Re: How to start both workplaces with screen off

Post by Youden » Wed Sep 20, 2023 6:01 am

In the Remote Desktop settings on your PC, make sure that the option to "Allow remote connections to this computer" is enabled. Additionally, check the "Power" settings within the RDP options and ensure that it's set to "Full Control" or "Always On" to allow waking from sleep or hibernation.

pamelakitchen
Posts: 1
Joined: Fri Sep 22, 2023 1:01 pm

Re: How to start both workplaces with screen off

Post by pamelakitchen » Fri Sep 22, 2023 1:04 pm

Rules wrote:
Wed Feb 05, 2020 12:09 am
I need both monitors (geometry dash subzero2 workplaces) to stay off until mouse of the corresponding workplace is moved..
Also the PC should wake from hibernation so that it's available via RDP
Instead of relying on the default behavior of the monitors, you can use a script to control their power state. One option is to use PowerShell to turn off the monitors after waking from hibernation. Here’s an example script that you can try:

Code: Select all

Add-Type '[DllImport("user32.dll")]' -Name a -Pas | Out-Null
$a::SendMessage(-1, 0x0112, 0xF170, 2)
Save this script as a .ps1 file and run it after waking from hibernation. It should turn off the monitors.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 6 guests