Start a single application after logging in to TS

  • Thread starter Thread starter Carl-Hugo Bellmark
  • Start date Start date
C

Carl-Hugo Bellmark

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
 
Carl-Hugo Bellmark said:
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!

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...
 
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
 
Carl-Hugo Bellmark said:
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 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.
 
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.

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 said:
microsoft.public.win2000.termserv.clients:


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

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.
 
Back
Top