How to set RDC to logout when an application quits

I would like to set RDC to quit when a user exits the application that automatically opens once then run my RDC script. How can I do this? There are options for starting apps when RDC starts, but nothing on ending RDC when an application is stopped / quit.
LVL 4
bthomasianAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

carl_legereCommented:
my method for doing this involves setting the MSTSC client to run just the single program, and saving the rdp file.  When the .rdp file is run it connects to the server, you authenticate if necessary, and then it starts the program (this is great for Peachtree / Quickbooks, or perhaps IE on a kiosk)  when the program is closed, the terminal session closes properly with it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
carl_legereCommented:
be sure to do with the latest RDP client, you can download them from MS.
go to the programs tab, start the following program, fill in both prompts and save it on the general tab.  This RDP file is portable
0
bthomasianAuthor Commented:
Yup, I know how to set up applications on startup, in this case I just added it to the Startup Items menu, I can do that this was as well, same thing, however, what I am looking to do is have RDC logout the user once they close this application so they do not remain logged in. I don't have enough Terminal Services licenses to buy them for everyone and I shouldn't have to. Even if I did buy enough licences, I don't want people accidently chooseing to Restart the file server when trying to logout.

Thanks for the feedback
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

bthomasianAuthor Commented:
Oh wait, I just read your first post, so if an application is set to open it from that programs tab then it will automatcially close RDC if they close it as well... sorry for the pre-mature responce, I'll give that a try!
0
bthomasianAuthor Commented:
Thanks for the reply, here is my problem with doing it the way you suggested... when I do I get an error message because the application isn't an application at all but actully is a shortcut. This thing is frustrating, I keep bumping into brick walls.
0
carl_legereCommented:
example to run IE:
program path and filename = C:\Program Files\Internet Explorer\iexplore.exe
start in the folder = C:\Program Files\Internet Explorer
0
bthomasianAuthor Commented:
I tried this and I get this error:

The system cannot find the file specified.
The initial program cannot be started: outlook:\\public%20folders\all%20public%20folders\Public%20Contacts
Please consult help for more information.


Basically I created a shortcut that works when I double click it in the dekstop, but when I referance the code like this or referance the shortcut I get the above error message. Any other ideas around this? I even tried creating a batch file and added the link here and the batch file wasn't successful at opening it either.
0
carl_legereCommented:
put double quotes around it and put in spaces
"outlook:\\public folders\all public folders\Public Contacts"

it may infact be impossoble to do this with oulook URL's
0
bthomasianAuthor Commented:
Here was the correct syntax that worked... thanks for all the help and effort! I created a batch file to run this from the "c:\Program Files\Micrsoft Office\Office11" folder

outlook.exe /select "outlook:\Public Folders\All Public Folders\Venrock MOUs"
0
carl_legereCommented:
kewl
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.