Solved

Log Off a Remote Desktop Connection User Using Access VBA

Posted on 2008-06-21
6
2,323 Views
Last Modified: 2013-11-28
I have 70+ users that hammer my Access 2003 application via Remote Desktop Connection with an average of about 20 logged in at any time.

Although they have been trained to use the proper logoff procedure, I still have users that exit my application and 'X' to close the RDC session rather than Start/Logoff.  Terminal Services reports those users as disconnected but doesn't release the "seat" or resources.

I need a Windows call or script that I can execute on form close that will perform the Start, Logoff, Yes sequence.


Best regards,
 
Rick Farris
{ contact info removed by PenguinMod, EE Moderator }
0
Comment
Question by:rhfarris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 31

Assisted Solution

by:Toni Uranjek
Toni Uranjek earned 50 total points
ID: 21837009
Hi rhfarris,

Configure your server to end disconnected sessions in tscc.msc or Group Policy.

"Designing Terminal Server Connection Configurations"
http://technet2.microsoft.com/windowsserver/en/library/c800698b-d5ce-4e71-aba6-3d3a5d3440b11033.mspx?mfr=true

Setting that you are looking for is called "End a disconnected session" on "Logon settings" tab in properties of RDP-Connector in tscc.msc.

HTH

Toni
0
 
LVL 12

Accepted Solution

by:
nexusnation earned 200 total points
ID: 21837057
On form close, you can run shutdown.exe:

Shell("shutdown.exe -l", 1)

The switch -l performs a log-off.  For more info, type "shutdown /?" from the command prompt.

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21837469
you can design your access application with disabled (X) and File>Exit

How to disable the Close button on the Application window and the Exit command on the File menu

http://support.microsoft.com/?kbid=300688

0
 

Author Comment

by:rhfarris
ID: 21837480
I failed to indicate they were Xing out of the RDC window.  The app requires them to use a close button (X is disabled)
0
 

Expert Comment

by:08454580116
ID: 21867846
Does anybody know how to create a simple icon to allow that can be used to close the remote desktop connection that you are in.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question