Prevent screen from turning off when screen recording


  1. Posts : 14
    Windows 10 Home 64-bit
       #1

    Prevent screen from turning off when screen recording


    Hi! Is it possible to prevent my screen from turning off when I'm recording it through the Xbox Game Bar (Win + G)? If my screen turns off during recording, the recording is stopped and not saved, which can be really annoying. On the other hand, when I am not recording my screen I do want it to turn off after some time. I just don't want it to turn off during recording. I'm using Windows 10 Home 64-bit.
      My Computer


  2. Posts : 34,948
    Win 10 Pro (1903) (2nd PC is 21H2)
       #2

    Hi, there's this free program - which also has some command line options- which may prevent that happening.
    You could simply start that before your recording and see if it works for you.
    Prevent screen from turning off when screen recording-1.png


    Otherwise: consider what's actually turning your screen off? Is this a desktop and monitor, a laptop or something else?
    No specs, and no build number (which the forum prompted you for).

    If you wanted to make this automatic and the Game Bar itself offers no related options, then I'd guess as a first thought you'd be looking at a script to be running to prevent this
    Prevent screen from turning off when screen recording-1.png
    - if this is what's turning off your display- when the game bar is in use.

    E.g. invoke Don't sleep, and then close it when the Game Bar is no longer in use.
      My Computers


  3. Posts : 14
    Windows 10 Home 64-bit
    Thread Starter
       #3

    Thank you for your reply! It's an HP laptop and I'm pretty sure it's Windows turning off the display. I checked the Xbox app settings and the Xbox Game Bar settings, but there's no option to prevent the screen from turning off during screen recording. I ended up extending the idle time needed for the screen to go to sleep in the power options. I might try out the program you mentioned too.
      My Computer


  4. Posts : 11,384
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #4

    If you want a simple script you can run when you are about to start a recording then you can use this one. I use it for similar jobs and some other TenForums members have successfully copied it for their own use.

    Once started, it keeps on running until you tell it to stop by closing its window.

    Keep display on.bat
    Code:
    :: Purpose - Stop the display blanking without changing power options
    :: Closure - Hover the cursor over its Taskbar icon and click on the X button of its popup thumbnail [or click on the Taskbar icon and click on the x control of its Control box in the top right corner of its window]
    
    @Title Close to allow sleep
    
    @set ThisVBScript="%TEMP%\KeepDisplayOn-%RANDOM%.vbs"
        @Echo Set WshShell = WScript.CreateObject("WScript.Shell") > %ThisVBScript%
        @Echo WshShell.SendKeys "{NUMLOCK}" >> %ThisVBScript%
        @Echo WshShell.SendKeys "{NUMLOCK}" >> %ThisVBScript%  
    
    :ReRunKeepDisplayOn
     @call %ThisVBScript% 
     @TimeOut /T 20 /NOBREAK >nul
    @GoTo ReRunKeepDisplayOn

    I run it by using a shortcut that minimises it to the Taskbar
    Prevent screen from turning off when screen recording-keep-display-lnk-properties.png
    and that uses an icon I chose so I could tell at a glance what it is that's running so I do not have to stop and look to check.

    I put all my scripts within a folder that I've set up to require admin permission to edit as a security measure.
    Set up my Tools folder ditty - TenForums

    All the best,
    Denis
      My Computer


  5. Posts : 1,806
    Windows 10 Pro 21H1 19043.1348
       #5

    Try3 said:
    If you want a simple script you can run when you are about to start a recording then you can use this one. I use it for similar jobs and some other TenForums members have successfully copied it for their own use.

    Once started, it keeps on running until you tell it to stop by closing its window.

    Keep display on.bat
    Code:
    :: Purpose - Stop the display blanking without changing power options
    :: Closure - Hover the cursor over its Taskbar icon and click on the X button of its popup thumbnail [or click on the Taskbar icon and click on the x control of its Control box in the top right corner of its window]
    
    @Title Close to allow sleep
    
    @set ThisVBScript="%TEMP%\KeepDisplayOn-%RANDOM%.vbs"
        @Echo Set WshShell = WScript.CreateObject("WScript.Shell") > %ThisVBScript%
        @Echo WshShell.SendKeys "{NUMLOCK}" >> %ThisVBScript%
        @Echo WshShell.SendKeys "{NUMLOCK}" >> %ThisVBScript%  
    
    :ReRunKeepDisplayOn
     @call %ThisVBScript% 
     @TimeOut /T 20 /NOBREAK >nul
    @GoTo ReRunKeepDisplayOn

    I run it by using a shortcut that minimises it to the Taskbar

    and that uses an icon I chose so I could tell at a glance what it is that's running so I do not have to stop and look to check.

    I put all my scripts within a folder that I've set up to require admin permission to edit as a security measure.
    Set up my Tools folder ditty - TenForums

    All the best,
    Denis



    Thanks for the useful script. I wasn't able to 'Thank' you today.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:14.
Find Us




Windows 10 Forums