I want to take screenshots from other logon sessions. Taking screenshot from the session that has ran the executable is okay but how can I do this with other sessions ? Note: My executable is going to be executed as administrator.
You can't access UIs from across session boundaries. You will have to run a separate process in the target session, and then that process can capture the screenshot locally and then use an IPC mechanism of your choosing, such as a socket or pipe, to transmit the data to your main process.