R – Session 0 Isolation

servicesession-0-isolationvista-securitywindows-vista

Vista puts out a new security preventing Session 0 from accessing hardware like the video card, and the user no longer logs into session 0. I know this means that I cannot show the user a GUI, however, does that also mean I can't show one at all? The way my code is set up right now, it would be more work to make it command line only, however if I can use my existing code and just programmatically manage the GUI it would take a lot less code.

Is this possible?

The article from MSDN says this:

• A service attempts to create a user interface (UI), such as a dialog box, in Session 0. Because the user is not running in Session 0, he or she never sees the UI and therefore cannot provide the input that the service is looking for. The service appears to stop functioning because it is waiting for a user response that does not occur.

Which makes me think it is possible to have an automated UI, but someone told me that you couldn't use SendKeys with a service because it was disabled in Session 0.

EDIT: I don't actually need to show the user the GUI

Best Answer

You can show one; it just doesn't show up.

There is a little notification in the taskbar about there being a GUI window and a way to switch to it.

Anyway, there actually is a TerminalServices API command to switch active session that you could call if you really needed it to show up.

Related Topic