how to capture windows desktop when screen locked

86 views
Skip to first unread message

Jianjiao Sun

unread,
Apr 1, 2022, 7:33:47 PMApr 1
to discuss-webrtc
hello,
    I have used  the gid,dxgi,wgc  to capture desktop on windows 10. I can't capture the "input password desktop".
    
   I have searched the groups, find the topic :"Chromium will soon disable camera capture after screen lock"(https://groups.google.com/g/discuss-webrtc/c/X46ua1nCR3Y/m/nQbxX0JmCAAJ).  the chrome can disable the stop capture feature use command "-disable-features=StopVideoCaptureOnScreenLock." 

  Is any way to enable to capture locked desktop on windows?

Thanks!

Vitaly Ivanov

unread,
Apr 2, 2022, 2:05:49 AMApr 2
to discuss...@googlegroups.com
Same question here. I've tried running my native (Windows executable linked against libwebrtc) webrtc app as a service, but it didn't work at all

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/d5a37156-e1ce-4ee8-9be8-0689327eb936n%40googlegroups.com.
Message has been deleted
Message has been deleted

Jianjiao Sun

unread,
Apr 14, 2022, 4:23:56 AMApr 14
to discuss-webrtc
I have found the way to capture the locked screen. It's a privilege problem. If we run as "Local System",  we can capture the locked screen。

For example, WebRTC use the   "DuplicateOutput   api"  to capture secure desktop need  Local System  privilege,   otherwise will get E_ACCESSDENIED error. (https://docs.microsoft.com/en-us/windows/win32/api/dxgi1_2/nf-dxgi1_2-idxgioutput1-duplicateoutput)  

If we only want to test the program , we can use psexec (https://docs.microsoft.com/en-us/sysinternals/downloads/psexec).

Vitaly Ivanov

unread,
Apr 14, 2022, 5:56:11 AMApr 14
to discuss...@googlegroups.com
Thank you for the insights! I can't make it work though, at least on Win 11. It looks like the process gets killed / crashes shortly after I do Lock Screen (I see the lock screen, but in a few seconds I get a connection dropped notification), even though it's running as System

Jianjiao Sun

unread,
Jun 13, 2022, 11:40:48 PM (11 days ago) Jun 13
to discuss-webrtc
Recently, We also test on windows 11,    runnning as System works well.  I find Nircmd( https://www.nirsoft.net/utils/nircmd.html ) is more convient for us to run the application as system.
At the same time , we must run as an application , not a service(https://docs.microsoft.com/en-us/windows/win32/services/interactive-services)

Vitaly Ivanov

unread,
Jun 14, 2022, 12:09:24 AM (11 days ago) Jun 14
to discuss...@googlegroups.com
Yes, it does work. The app was crashing due to clipboard tracking going haywire in locked state. I haven't tried NirCmd as we started with PsExec and then switched to doing the same thing with Windows API without any external tools. Will check out NirCmd, thanks for sharing info!

Reply all
Reply to author
Forward
0 new messages