Re: Restricting TS USers

Tech-Archive recommends: Fix windows errors by optimizing your registry



Is this a real-world problem for your users, or are you only
testing?
The 1 minute delay happens only when you exit the application
within 1 minute of starting it. Real users will seldom do that.

901196 - A remote session does not end immediately on a computer
that is running Windows Server 2003 Service Pack 1
http://support.microsoft.com/?kbid=901196

_________________________________________________________
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
TS troubleshooting: http://ts.veranoest.net
___ please respond in newsgroup, NOT by private email ___

=?Utf-8?B?UnVzc2VsbDM=?= <Russell3@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote on 06 sep 2006 in
microsoft.public.windows.terminal_services:

Thanks for this Vera.

In my case when the user exits MSPaint the user is not logged
off immediately (I did not notice there was a time delay unitl
now). The three processes running for the remote users are:
MSPAINT.exe
RDPCLIP.exe
USERINIT.exe
After the User exists MS paint the other two processes alone are
running for the user. They seem to timeout after at most a
minute, after which the user is logged off automatically.

"Vera Noest [MVP]" wrote:

From http://ts.veranoest.net/ts_faq.htm

Q. My session doesn't logoff when I quit my starting or
published application

A. If you define a Starting application, either in Terminal
Services Configuration, a GPO or in your RDP client, your
session should be automatically logged off when you quit the
application. Sometimes, this doesn't happen and you are left
with a session which only shows the desktop background, without
the possibility to log off the session manually. The cause for
this problem is a process which is still running in your
session, preventing it from closing and logging off. The same
can happen after quitting a Citrix published application.

To solve the problem, open a second connection to the Terminal
Server and check in Task manager which process is keeping the
session from closing. Some anti-virus applications are known to
cause this behaviour.
If you can't avoid running the process, you can use a
work-around to log off your session.

Create a batch file, containing something like this:
cd <path_to_the_folder_containing_your_application>
start /wait <application_executable>
logoff

Now define this batch file as the starting application.
Or use the following vb script to launch your application, and
define the vb script as the starting application.

Dim objWshShell, objExec, strAppExe

strAppExe =
"<path_to_the_folder_containing_your_application>
\<application_executable>" Set objWshShell =
CreateObject("WScript.Shell") Set objExec =
objWshShell.Exec(strAppExe) Do While objExec.Status = 0
WScript.Sleep 500
Loop
Set objExec = objWshSHell.Exec("logoff")

For a different solution to the problem, and a list of known
processes which cause this behaviour, check:

CTX891671 - Graceful Logoff from a Published Application Keeps
Sessions in Active State
http://knowledgebase.citrix.com/kb/entry.jspa?externalID=CTX8916
71 _________________________________________________________
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
TS troubleshooting: http://ts.veranoest.net
___ please respond in newsgroup, NOT by private email ___

=?Utf-8?B?UnVzc2VsbDM=?= <Russell3@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote on 04 sep 2006 in
microsoft.public.windows.terminal_services:

Thanks for commenting.
As an example I have a users who when they logon on, MS Paint
runs. No other action seems possible for the user other than
what MS Paint can do. This is just what I need. Then when the
usec closes MS Paint a blank screen is present with nothin
else possible except what is available from the dropdown
yellow tab. How is a user to log off? At prsent I have then
press the [X] on th eyellow tab and my settings will log them
off automatically after N minutes.

So the problem I point to is not, I think, with th eprogram
I'm auto starting for the user.

Thanks
Russell

"Bernhard Tritsch [MVP]" wrote:

Your procedure looks fine. What kind of user program is it
you are running on the TS. Can you check if it launches any
additional background process that prevents sessions to
terminate properly when interactive users log off.

Benny

--
Bernhard Tritsch
MVP Windows Server - Terminal Server
Author of "Windows Server 2003 Terminal Services", MS Press
http://www.wtstek.com


"Russell3" <Russell3@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:D1D87511-34F5-45ED-AAE2-EDAF153E7426@xxxxxxxxxxxxxxxx
Thanks Brett for this reply. Can I check my procedure with
you?

I have tried this with a program that runs fine in TS
sessions for "ordinary" TS users and when the program is
closed the TS session shows a blank screen with no
opportunity for the user to logoff the TS session.
Upon
using the disconnect [X] (yellow bar that pops down) the
user is logged
off
as I have UserProperties - Sessions - End Disconnected
session after x minutes.

Should the program have code to log-off the user on
program shutdown?

I am using ServerD as the domain server (SBS 2003) and as
the licensing server for ServerTS (WIn 2003 Server Std).

The user properties are set on ServerD.

"Brett I. Holcomb" wrote:

One thing you can do is have a program run at startup -
when the users login. If they exit the program they are
logged off.

Docs - check MS knowledgebase for articles.

Russell3 wrote:

We have users connecting to TS from remotes sites. I
want to restrict
only
some users to one program on the TS. How can I best do
this or where
is a
guide to doing this? Thanks.

--
Brett I. Holcomb
brettholcomb@xxxxxxxxxxxxxxxxx
Remove R777 to email
.



Relevant Pages

  • Re: Restricting TS USers
    ... Services Configuration, a GPO or in your RDP client, your session ... Set objExec = objWshShell.Exec ... MCSE, CCEA, Microsoft MVP - Terminal Server ... terminate properly when interactive users log off. ...
    (microsoft.public.windows.terminal_services)
  • Re: RWW Timing
    ... I understand that you want to monitor when and how ... > to an internal Windows XP or Terminal Server computer. ... SBS creates a connection to the internal client on port 3389 which is ... But it can not tell which one session from the RWW, ...
    (microsoft.public.windows.server.sbs)
  • Re: Restricting TS USers
    ... MCSE, CCEA, Microsoft MVP - Terminal Server ... Terminal Services and Microsoft Windows Server 2003 Service Pack ... the remote session does not end immediately. ...
    (microsoft.public.windows.terminal_services)
  • Re: ASP sessionstate
    ... :>: so it is a clientside issue. ... ASP doesn't know or care what browser it ... but then it is not a new session. ... :> How can a Response.Write write to the server screen? ...
    (microsoft.public.inetserver.asp.general)
  • RE: Auto logoff problem
    ... This should only happen when you start the application and exit it ... MCSE, CCEA, Microsoft MVP - Terminal Server ... with 2003 and that it takes one minute for the session to end. ... This is setup ...
    (microsoft.public.windows.terminal_services)