Re: Interactive Services in Vista - impossible at all?



Herrmann Michailowicz wrote:
[...]
Our service performs the following tasks (the service is started under
system account)

- obtain a sid by doing a LogonUser(...) (user may be administrator or
not)

- switch to interactive winsta & desktop Wintsa0\Default
and add an access-allowed ACE with the obtained sid to Winsta0 &
Default

- launch an (GUI-MFC) app with Wints0\Default as winsta/desktop
combination

Up to XP all works perfectly i.e. the app runs under the desired account
and has desktop access.

As reported earlier in some ngs Vista won't allow this any more - seems
to be right.

The service starts correctly, adds the ACEs to Winsta0\Default, launches
the app (Showed in TaskMgr does logfile writes as expected).

But: It ain't visible, i.e. does *not* run on the interactive Winsta.

Can anybody tell me how to fix that if possible at all?
I assume that Winsta0\Default ain't the "real" interactive desktop ....

Help would be greatly appreciated!

Basically, even the console GUI session is not running in session 0
anymore. Session 0 is reserved for system services. There's an MSDN
article describing what should be changed with respect to interactive
services:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/interactive_services.asp

Other that that, perhaps it's possible to create your GUI in the console
session using a couple of terminal service functions, like this:

session_id = WTSGetActiveConsoleSessionId ();
ts_hdl = WTSOpenServer (my_machine);
WTSQuerySessionInformation (ts_hdl, session_id, WTSWinStationName, ...);
SetTokenInformation (my_user_token, TokenSessionId, session_id, ...);
etc.

That's just an idea. I didn't test it myself, so take this with a grain
of salt.


Corinna

--
Antworten an o.g. (existierende) Adresse werden ungelesen verworfen.
Private Mails bitte an corinnaPLOPvinschenPINGde.
.



Relevant Pages

  • Re: Can SID be trusted?
    ... Jerry Stuckle wrote: ... [Having the session ID in SID even when cookies are used] ... in SID - and, not knowing any better, gets the session id and places it ...
    (comp.lang.php)
  • nxclient stopped working after xorg upgrade
    ... deb-src http://debian.tu-bs.de/project/kanotix/unstable/ sid nx ... After upgrading sid machine to the latest xorg, nxclient stopped working. ... NX> 703 Session type: unix-kde ...
    (Debian-User)
  • Re: How to detect if is it system service ?
    ... the account the code is running under, for instance most services run under the system account. ... In Vista and later you could also check the session since services run in Session 0 while normal code runs in other sessions. ... It should pass errors on to the calling program and let that handle the errors. ... However there are some reasons which make this acceptable in this case: it is only done in debug builds and also it is only done when "sky is falling" type of error is detected and it is then easy to attach the debugger to the program and then debug the situation. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: How to detect if is it system service ?
    ... the account the code is running under, for instance most services run under the system account. ... In Vista and later you could also check the session since services run in Session 0 while normal code runs in other sessions. ... It should pass errors on to the calling program and let that handle the errors. ... However there are some reasons which make this acceptable in this case: it is only done in debug builds and also it is only done when "sky is falling" type of error is detected and it is then easy to attach the debugger to the program and then debug the situation. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: [PHP] PHP Session Variables Not Being Set For Certain Browsers
    ... > with setting php session variables on certain end user browsers (certain ... do not allow cookies. ... Using this fact about the constant SID ... If the user's browser accepts cookies, ...
    (php.general)