How to start both workplaces with screen off
How to start both workplaces with screen off
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
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...
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
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...
Re: How to start both workplaces with screen off
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.
-
- Posts: 1
- Joined: Fri Sep 22, 2023 1:01 pm
Re: How to start both workplaces with screen off
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:Rules wrote: ↑Wed Feb 05, 2020 12:09 amI 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
Code: Select all
Add-Type '[DllImport("user32.dll")]' -Name a -Pas | Out-Null
$a::SendMessage(-1, 0x0112, 0xF170, 2)
Who is online
Users browsing this forum: No registered users and 15 guests