Can a Windows service show the physical sign-in screen after Win+L and before the first sign-in after a restart, without RDP?

Okan Murat SÖNMEZ 0 Reputation points
2026-11-21T16:15:52.3766667+00:00

We develop OMS Assist, a 64-bit Windows remote support application. An administrator installs our service on managed devices and explicitly enables unattended access. We want an authorized technician to see the same live image that someone standing in front of the physical monitor would see.

We need to support two scenarios:

  1. A user presses Win+L during an active support session. The technician should see the physical lock screen and then the Windows sign-in screen in the same OMS Assist tab.
  2. The computer restarts and nobody has signed in yet. Once Windows, networking, and our service are running, the technician should be able to start a new connection and see the physical sign-in screen.

Our service runs in Session 0. We can already capture the unlocked desktop through a component running in the signed-in user’s session. For these two scenarios, we need read-only viewing using our own components, without RDP, a virtual monitor, or third-party remote access software.

Does Microsoft support a Windows API or architecture for either scenario? In particular, is DXGI Desktop Duplication supported for this purpose, and in what session and security context is the capture component expected to run? If the two scenarios have different support or limitations, please clarify each separately. A link to official documentation or a Microsoft sample would help us choose the right design.

Thank you, NoveraSoft – OMS Assist Development Team

Windows development | Windows API - Win32

2 answers

Sort by: Most helpful
  1. Zack Nguyen (WICLOUD CORPORATION) 485 Reputation points Microsoft External Staff Moderator
    2026-11-23T02:40:42.3366667+00:00

    Hi @Okan Murat SÖNMEZ ,

    Your test results are consistent with the documented DXGI Desktop Duplication behavior:

    • DXGI_ERROR_ACCESS_LOST can occur on a desktop switch, after which the duplication interface must be recreated, as documented for IDXGIOutputDuplication::AcquireNextFrame.
    • IDXGIOutput1::DuplicateOutput can then return E_ACCESSDENIED if the process cannot access the current desktop image. The documentation specifically states that only an application running as LOCAL_SYSTEM can access the secure desktop.

    However, a LocalSystem service in Session 0 is not the same as having a suitable capture process on the interactive/secure desktop. Windows isolates Session 0 from interactive user sessions. Microsoft's service guidance recommends using a separate process in the interactive user's context, but WTSQueryUserToken only provides the token of a logged-on user.

    For your two scenarios:

    • After Win+L: Desktop Duplication is supported for desktop capture/remote-access scenarios, but the switch to the secure desktop can invalidate the existing duplication interface. Capturing the secure desktop then has the additional LOCAL_SYSTEM access requirement documented by DuplicateOutput.
    • After restart, before sign-in: there is no logged-on user token for the usual WTSQueryUserToken + CreateProcessAsUser architecture. I could not find a publicly documented Win32 API or Microsoft sample that provides a general third-party service with the required pre-logon/secure-desktop process context for DXGI capture.

    So, while Microsoft documents Desktop Duplication as an API for ISV desktop collaboration and remote-access applications, the public documentation does not describe an end-to-end supported mechanism for a Session 0 third-party service to capture the physical secure sign-in desktop in these scenarios.

    I would avoid undocumented Winlogon/token/desktop manipulation. If secure sign-in capture is a product requirement, Microsoft Support for Business would be the appropriate channel to confirm whether a specific architecture beyond the publicly documented APIs is supported.


    I hope this helps clarifying your requirements and answering your questions. If you find my response helpful, I would greatly appreciate it if you could follow the guide here so others experiencing similar behavior can benefit from it as well.

    Was this answer helpful?


  2. Okan Murat SÖNMEZ 0 Reputation points
    2026-11-21T22:18:34.2+00:00

    Could someone from the Windows team clarify one point about the suggested architecture?

    We tested this on a physical Windows PC. After Win+L, our viewer displayed the lock screen. When the user pressed Enter locally to show the password field, AcquireNextFrame returned DXGI_ERROR_ACCESS_LOST. Our capture component then called DuplicateOutput again and received E_ACCESSDENIED. Capture resumed after the user unlocked the PC locally.

    Our administrator-installed service runs in Session 0. What Microsoft-supported mechanism, if any, can the service use to start a read-only capture component in the physical console session with the required security context?

    1. Is that mechanism supported when a signed-in user locks the PC with Win+L?
    2. Is it also supported after a restart, before anyone has signed in?

    We only need to display what is visible on the physical monitor, without RDP, a virtual monitor, or remote keyboard input. A reference to the supported API or a Microsoft sample would help. If either scenario has no publicly supported mechanism for third-party services, could you confirm which one?

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.