Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Log Off a Remote Desktop Connection User Using Access VBA

Posted on 2008-06-21
6
Medium Priority
?
2,390 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 200 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 800 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

715 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