Disable Windows 7 screensaver over RDP

6

How can I turn off the screensaver in RDP sessions and thus keep the session alive and unlocked, even if I am not actively working in it for some time?

Note: the solution should work without affecting the console itself. Only the RDP connections, please.

0xC0000022L

Posted 2012-10-03T10:56:31.777

Reputation: 5 091

Basically a duplicate, but no satisfactory answer either: http://serverfault.com/questions/159840

– 0xC0000022L – 2012-10-03T12:49:25.347

Answers

1

You can use the Registry Editor [Regedit.exe from command line] and find and edit the following key: HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive If your screen saver is currently enabled the value will be 1, change it to 0 to disable.


Before you make changes to a registry key or subkey, Microsoft recommends that you export, or make a backup copy, of the key or subkey. You can save the backup copy to a location you specify, such as a folder on your hard disk or a removable storage device. If you make changes that you want to undo, you can import the backup copy. More info here


NerdNextDoor

Posted 2012-10-03T10:56:31.777

Reputation: 56

Since this answer didn't answer your question, you should consider un-selecting it as an answer. You should accept BajaResident's answer, about TaskScheduler. – Edward Ned Harvey – 2016-05-10T02:14:15.000

Thans, but ... won't this actually also switch the screensaver off on the console? Which is exactly what I don't want ... – 0xC0000022L – 2012-10-03T12:45:07.957

With Windows 7 there is no client session. You are effectively logging in to the console session any time you log in using RDP. This will force the remote machine to show the log-on dialog.

Is your intent to have the monitor shut off or not display the desktop? – NerdNextDoor – 2012-10-04T11:59:30.997

thanks. I think one is attaching to the console session, just like one can do explicitly with mstsc. However, this doesn't help solve the problem, does it? :) ... I'm about to write a program that sits in the tray and only activates when run inside the RDP session and then prevents the screensaver from starting. – 0xC0000022L – 2012-10-04T13:29:19.527

2

I was able to accomplish this with TaskScheduler.

In Windows 7:

  1. Open Task Scheduler. Right click Task Scheduler Library and Create Task
    1. Name: Disable RDP Screen Saver
    2. Triggers: New Trigger, On Connection to User Session, Specific user (specify user), From a remote computer
    3. Actions: Start a program,
    4. Program: reg
    5. Arguments: add "HKEY_CURRENT_USER\Control Panel\Desktop" /f /v ScreenSaverIsSecure /t REG_SZ /d 0

In Windows 8, 10:

  1. Open Task Scheduler. Right click Task Scheduler Library and Create Task
    1. Name: Enable RDP Screen Saver
    2. Triggers: New Trigger, On disconnect from User Session, Specific user (specify user), From a remote computer
    3. Actions: Start a program,
    4. Program: reg
    5. Arguments: add "HKEY_CURRENT_USER\Control Panel\Desktop" /f /v ScreenSaverIsSecure /t REG_SZ /d 1

BajaResident

Posted 2012-10-03T10:56:31.777

Reputation: 21