Prev: How to eject removable devices programmatically?
Next: fltmgr.sys PDB and - fltkd WinDBG extension not working (windows XP) ...
From: Gudrun Berger on 9 Jan 2007 08:17 Hello, with TS it's possible to "take over" a different user session using taskmgr. Can anybody tell me how this is accomplished? Can I "transfer" an application from a different TS session to "my" session or send an application to a different session? How can a app started in a different TS session? I assume sufficient rights, i.e. at least admin rights.
From: Skywing [MVP] on 9 Jan 2007 11:12 Duplicate a primary token of a process on that session and pass to CreateProcessAsUser. If you are creating the token with your own credentials, use LsaLogonUser to create a token (and include the logon sid of the user native to that session - perhaps from retrieved from querying the token returned by WTSQueryUserToken - so that the new process has access to WinSta0\Default). Then, use SetTokenInformation(...TokenSessionId..) (requires SeTcbcPrivilege enabled and assigned) to set the session id in the token; this ensures that the process will start on the target session and not session zero. The resultant token can be passed to CreateProcessAsUser. If you have further questions, I would search the list archives, as there have been a number of questions about this topic answered recently. -- Ken Johnson (Skywing) Windows SDK MVP http://www.nynaeve.net "Gudrun Berger" <HeMi(a)t-online.de> wrote in message news:45a39603$0$488$bfcc4b32(a)reader.news.celox.de... > Hello, > > with TS it's possible to "take over" a different user session using > taskmgr. > > Can anybody tell me how this is accomplished? > > Can I "transfer" an application from a different TS session to "my" > session or send an application to a different session? > > > How can a app started in a different TS session? > > I assume sufficient rights, i.e. at least admin rights.
From: Remko on 24 Jan 2007 14:09
Or you can use the (undocumented) functions from Winsta.dll: WinStationShadow (shadow another user) WinStationConnectW (connect to another session) See for more info jwaWinsta.pas from the Jedi ApiLib: http://sourceforge.net/projects/jedi-apilib |