Solved

Log Off a Remote Desktop Connection User Using Access VBA

Posted on 2008-06-21
6
2,234 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
6 Comments
 
LVL 31

Assisted Solution

by:Toni Uranjek
Toni Uranjek earned 50 total points
Comment Utility
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
Comment Utility
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 119

Expert Comment

by:Rey Obrero
Comment Utility
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
Comment Utility
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
Comment Utility
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Know what services you can and cannot, should and should not combine on your server.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now