smasherprog / screen_capture_lite

cross platform screen/window capturing library
MIT License
616 stars 156 forks source link

Running as SYSTEM user can't capture screen #133

Closed wang332127858 closed 1 year ago

wang332127858 commented 2 years ago

I was not yet able to capture the login screen using this method. Microsoft's documentation for IDXGIAdapter::EnumOutputs states "If you call this API in a Session 0 process, it returns DXGI_ERROR_NOT_CURRENTLY_AVAILABLE." On the login screen there are no other sessions yet so it seems impossible to get the capture running.

smasherprog commented 2 years ago

In order to be able to capture this, you must start the application up as administrator. There is no other way to capture this info..

smasherprog commented 2 years ago

if you start as non admin, you must restart the capturing program, there is no other way in windows to accomplish this.

wang332127858 commented 2 years ago

https://blog.actorsfit.com/a?ID=00350-adeb5c91-f0d7-488e-bc98-0530d8e3e916 But can't fetch after switching user

smasherprog commented 1 year ago

Correct! capturing the Login screen --or other NON USER level stuff-- on windows is Way way beyond this library. It involves changing users, starting the application as administrator.. etc. Its not trivial for sure!

This library WILL capture the screen correctly, but the application needs to RUN in a very specific way. You can check out code that I wrote for handle the various scenarios here https://github.com/smasherprog/RemoteDesktop/blob/a489f0b16153aaf0a090634ca34bd1ef37028669/RemoteDesktop_Library/ProcessUtils.cpp

smasherprog commented 1 year ago

Gonna close this. Please create a new issue if something is found!