Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Windows 2000 / Terminal Services / November 2004

Tip: Looking for answers? Try searching our database.

Start a single application after logging in to TS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Carl-Hugo Bellmark - 29 Nov 2004 16:24 GMT
I have been looking all over for a simple solution to
execute my application when my users log on to my W2K TS.

There are many different suggestions, but can someone
please tell me (from their own experience) what really
works?

I only want one application to run when they log on and
if they close it will that also close the TS client.

If there is a good way to do it without tons of hacking,
im very happy!

I really appritiate all good answers!

With kind regards, Carl-Hugo
Sweden
Olof Lagerkvist - 29 Nov 2004 17:15 GMT
> I have been looking all over for a simple solution to
> execute my application when my users log on to my W2K TS.
[quoted text clipped - 10 lines]
>
> I really appritiate all good answers!

Maybe it is possible to e.g. write a VB script that execute the
application you want, wait for it to terminate and then logout.

If that is difficult it would be no problem to write a very small
program in C that does exactly that. I can do that for you in a few
minutes if you like, but I think there must be existing programs
available already that do this...

> With kind regards, Carl-Hugo
> Sweden

Sweden here too...

Signature

Olof Lagerkvist
ICQ: 724451
Web page: http://here.is/olof

Jay Cook - 29 Nov 2004 18:09 GMT
Sorry this is done under they enviroment tab

Jay

> I have been looking all over for a simple solution to
> execute my application when my users log on to my W2K TS.
[quoted text clipped - 13 lines]
> With kind regards, Carl-Hugo
> Sweden
Jay Cook - 29 Nov 2004 18:10 GMT
Hi what I used to do was under the Application tab, you would put the
application short cut in and then the start in directory for the app you are
trying to run.

you need to install the app via the add remove programs if possible, and by
default it will close the terminal server connection when you close the app.

the only problems I ran in to is if you close the app and it doesn't fully
terminate then when the user reconnect they will get a blank screen and can't
do anything.

to get around this have the terminal server reset connection after idle  for
more then 5 mins or 1 min

hope that helps

Jay

> I have been looking all over for a simple solution to
> execute my application when my users log on to my W2K TS.
[quoted text clipped - 13 lines]
> With kind regards, Carl-Hugo
> Sweden
Olof Lagerkvist - 29 Nov 2004 19:54 GMT
> I have been looking all over for a simple solution to
> execute my application when my users log on to my W2K TS.
[quoted text clipped - 8 lines]
> If there is a good way to do it without tons of hacking,
> im very happy!

I already had a program that did almost what you wanted and now after
five minutes of changing it is what I think you wanted.

I called it logonwrap, download from:
http://here.is/olof/files/logonwrap.zip

Put the exe file in a directory accessible on the Terminal Server for
all sessions. Use the ordinary function in Terminal Services to start a
specific application when a user logs on (could be set in the client,
generally on the server och per user) to specify that logonwrap.exe
should start. After logonwrap.exe on the command line you type the
command line that you actually want to run:
C:\winnt\logonwrap.exe "C:\Program Files\MyProgam\MyProgram.exe"
programparameter1 programparameter2

What then happens upon logon is that logonwrap starts MyProgram.exe and
sends the parameters following on the command line. When MyProgram.exe
terminates, the session is automatically logged off.

Signature

Olof Lagerkvist
ICQ: 724451
Web page: http://here.is/olof

Vera Noest [MVP] - 29 Nov 2004 21:29 GMT
Olof Lagerkvist <no@email.address> wrote on 29 nov 2004 in
microsoft.public.win2000.termserv.clients:

>> I have been looking all over for a simple solution to
>> execute my application when my users log on to my W2K TS.
[quoted text clipped - 29 lines]
> line. When MyProgram.exe terminates, the session is
> automatically logged off.

That sounds like a very complicated way to start your application
from a batch file:

start/wait my_app.exe
logoff

Note that all the above only should be done as a last resort, when
the starting application leaves an active process in the users
session, thereby preventing the session from closing.
Personally, I would try to find out which process is still running
in the session, and why.

--
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
http://hem.fyristorg.com/vera/IT
--- please respond in newsgroup, NOT by private email ---
Olof Lagerkvist - 29 Nov 2004 22:42 GMT
> Olof Lagerkvist <no@email.address> wrote on 29 nov 2004 in
> microsoft.public.win2000.termserv.clients:

>>What then happens upon logon is that logonwrap starts
>>MyProgram.exe and sends the parameters following on the command
[quoted text clipped - 6 lines]
> start/wait my_app.exe
> logoff

That would leave a visible console window open and users may close it
(maybe by accident) causing the batch file to stop before it reaches
logoff. Also, users may find it annoying to have the console window open
in their sessions. As an alternative like I wrote in an earlier post it
may be possible to write a small VB script instead and have wscript.exe
run it, that would not create a console window. But in this case I
thought it was easier to write a small C program that compiles to a
small (4 KB) exe file.

> Note that all the above only should be done as a last resort, when
> the starting application leaves an active process in the users
> session, thereby preventing the session from closing.

Of course.

> Personally, I would try to find out which process is still running
> in the session, and why.

Yes, of course, but that is not always possible. A good example is
ctfmon.exe that may sometimes be left running on a session with no
visible applications running, and there are others too that may be
automatically executed when users log on or somewhere else in the
session. It is not always possible to close such processes without a
real logoff command in some way to get them closed.

Signature

Olof Lagerkvist
ICQ: 724451
Web page: http://here.is/olof

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.