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
Solved

Log Off a Remote Desktop Connection User Using Access VBA

Posted on 2008-06-21
6
2,295 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
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

861 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