1

We had a requirement where we need to run a C# windows form application in background and take the screen capture( off-screen rendering and capturing ). Our application will be running in SYSTEM user. We were able to capture the screen. But when the application is ran under SYSTEM user, the resolution is not coming correctly. The resolution is coming as 1024*786.

Is this an expected behavior? I mean to say, if an application is ran under SYSTEM user, will the resolution change ?

Kiran Joshy
  • 105
  • 10
  • The System account is normally used only for a service. Which runs in an isolated session with its own desktop. Don't use a service. And never, *never* run a program that interacts with the user's desktop with the System account, shatter attacks are a very nasty security problem. And be sure to declare your app [to be dpiAware](http://stackoverflow.com/a/13228495/17034). – Hans Passant Dec 12 '15 at 08:45
  • There is no user interaction in the application which is run in SYSTEM user. Actually we are running the application using some config files, only to capture the screen. This application will be invoked from a service which is running under SYSTEM user. Due to this, we are forced to run the application under SYSTEM user and take the captures. Is there any documentation/links describing the resolution of the application that will be running in the SYSTEM user ? – Kiran Joshy Dec 12 '15 at 14:17

1 Answers1

0

I could conclude that the resolution of SYSTEM user cannot be changed at any cost. SYSTEM user has its own desktop, which is not visible to the user since it does not supports any user interaction. You should run your application with UI in a SYSTEM user, if and only if there is no other workaround.

Kiran Joshy
  • 105
  • 10