Jump to content

How to logoff client immediately when using RemoteApp of WinSrv 20


Recommended Posts

Posted

Hi:

 

I am using remote app features of Windows server 2008 (rc0).

I need to logoff the client immediately when the user close his/her remote

app. But in TS connection configurations, the minimum time I can set is 1

min. It is still too long for me.

From TS manageer, I find that I can "reset" a user when I know she is

disconnected. So how can I do this "reset" through a program? Any APIs for

it? BTW: What's the difference between "reset" and "logoff" command? The only

difference I notice is that when I use "logoff", the win 2008 will pop up an

error! And an error will also shown on client's computer.

 

Another option I find is to let the user press "alt +ctrl+end" to invoke the

security dialog and then logoff manually. Still, I want to do this

automatically through some program. If there is an API , I will learn and

write program for it.

 

Any suggestions?

 

Thanks.

 

Jiang

  • Replies 4
  • Created
  • Last Reply

Popular Days

Posted

Re: How to logoff client immediately when using RemoteApp of WinSrv 20

 

Hi,

 

Change the "Set time limit for logoff of RemoteApp sessions" GPO

setting to Immediately. Even with this set there will be a 20 second

delay after the application is closed.

 

Please see this blog post for more information:

 

http://blogs.msdn.com:80/ts/archive/2007/09/28/terminal-services-remoteapp-session-termination-logic.aspx

 

Thanks.

 

-TP

 

Jiang wrote:

> Hi:

>

> I am using remote app features of Windows server 2008 (rc0).

> I need to logoff the client immediately when the user close his/her

> remote app. But in TS connection configurations, the minimum time I

> can set is 1 min. It is still too long for me.

> From TS manageer, I find that I can "reset" a user when I know she is

> disconnected. So how can I do this "reset" through a program? Any

> APIs for it? BTW: What's the difference between "reset" and "logoff"

> command? The only difference I notice is that when I use "logoff",

> the win 2008 will pop up an error! And an error will also shown on

> client's computer.

>

> Another option I find is to let the user press "alt +ctrl+end" to

> invoke the security dialog and then logoff manually. Still, I want to

> do this automatically through some program. If there is an API , I

> will learn and write program for it.

>

> Any suggestions?

>

> Thanks.

>

> Jiang

Guest Benny Tritsch [MVP]
Posted

Re: How to logoff client immediately when using RemoteApp of WinSrv 20

 

The 20 second delay for terminating the session after closing the last

RemoteApp program is hard-coded into the system. It prevents the immediate

creation of a new session if the user closes an app and wants to open

another. It requires less resources if the session "waits" in case the user

wants to start another RemoteApp program. Only if no other RemoteApp program

is launched within this 20 second timespan, the session is disconnected or

terminated. Until now (RC0) this behavior cannot be changed.

 

Benny

 

--

Bernhard Tritsch

MVP Windows Server - Terminal Server

Author of "Windows Server 2003 Terminal Services", MS Press

http://www.wtstek.com

 

"TP" <tperson.knowspamn@mailandnews.com> wrote in message

news:OFKTZgpBIHA.5360@TK2MSFTNGP03.phx.gbl...

> Hi,

>

> Change the "Set time limit for logoff of RemoteApp sessions" GPO setting

> to Immediately. Even with this set there will be a 20 second delay after

> the application is closed.

>

> Please see this blog post for more information:

>

> http://blogs.msdn.com:80/ts/archive/2007/09/28/terminal-services-remoteapp-session-termination-logic.aspx

>

> Thanks.

>

> -TP

>

> Jiang wrote:

>> Hi:

>>

>> I am using remote app features of Windows server 2008 (rc0).

>> I need to logoff the client immediately when the user close his/her

>> remote app. But in TS connection configurations, the minimum time I

>> can set is 1 min. It is still too long for me.

>> From TS manageer, I find that I can "reset" a user when I know she is

>> disconnected. So how can I do this "reset" through a program? Any

>> APIs for it? BTW: What's the difference between "reset" and "logoff"

>> command? The only difference I notice is that when I use "logoff",

>> the win 2008 will pop up an error! And an error will also shown on

>> client's computer. Another option I find is to let the user press "alt

>> +ctrl+end" to

>> invoke the security dialog and then logoff manually. Still, I want to

>> do this automatically through some program. If there is an API , I

>> will learn and write program for it.

>>

>> Any suggestions?

>>

>> Thanks.

>>

>> Jiang

Posted

Re: How to logoff client immediately when using RemoteApp of WinSr

 

Re: How to logoff client immediately when using RemoteApp of WinSr

 

I see. Many thanks.

 

I am still wondering if there is some API that I can call to logoff or reset

the session through programming?

 

Thanks.

 

 

"Benny Tritsch [MVP]" wrote:

> The 20 second delay for terminating the session after closing the last

> RemoteApp program is hard-coded into the system. It prevents the immediate

> creation of a new session if the user closes an app and wants to open

> another. It requires less resources if the session "waits" in case the user

> wants to start another RemoteApp program. Only if no other RemoteApp program

> is launched within this 20 second timespan, the session is disconnected or

> terminated. Until now (RC0) this behavior cannot be changed.

>

> Benny

>

> --

> Bernhard Tritsch

> MVP Windows Server - Terminal Server

> Author of "Windows Server 2003 Terminal Services", MS Press

> http://www.wtstek.com

>

> "TP" <tperson.knowspamn@mailandnews.com> wrote in message

> news:OFKTZgpBIHA.5360@TK2MSFTNGP03.phx.gbl...

> > Hi,

> >

> > Change the "Set time limit for logoff of RemoteApp sessions" GPO setting

> > to Immediately. Even with this set there will be a 20 second delay after

> > the application is closed.

> >

> > Please see this blog post for more information:

> >

> > http://blogs.msdn.com:80/ts/archive/2007/09/28/terminal-services-remoteapp-session-termination-logic.aspx

> >

> > Thanks.

> >

> > -TP

> >

Posted

Re: How to logoff client immediately when using RemoteApp of WinSr

 

Re: How to logoff client immediately when using RemoteApp of WinSr

 

Hi Jiang,

 

If it is your application add a call to ExitWindowsEx

function to the exit code (or run logoff.exe). That way when

the user closes the application it will immediately logoff their

session (no 20 second delay, no client-side error).

 

If it is not your application you can make a small program

that will launch it, wait for it to close, and then logoff the

session. In this case you will make your custom app

available via RemoteApp instead of the real application.

 

Keep in mind that if there is another application running in

the session it will be closed when the remoteapp program

is closed.

 

I tested the above and it achieves the desired result.

 

-TP

 

Jiang wrote:

> I see. Many thanks.

>

> I am still wondering if there is some API that I can call to logoff

> or reset the session through programming?

>

> Thanks.


×
×
  • Create New...