Solved

Using Delphi 6, how to programmatically read/add/remove a name to the allowed list of users in Remote Desktop in Windows XP?

Posted on 2012-03-19
3
700 Views
Last Modified: 2012-03-23
Or better still, how to interface to the Remote Desktop?

I want to be able to set the checkbox "Allow users to connect to this computer".

If it is allowed to access, how to programmatically read/add/remove a name to the allowed list of users in Remote Desktop in Windows XP?

Using Delphi 6 only.
RDP.bmp
0
Comment
Question by:sepknow
3 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 37740551
There are Windows tools that can do that.

Why do you want to do it from a Delphi program?

mlmcc
0
 
LVL 26

Expert Comment

by:Sinisa Vuk
ID: 37741133
With Tregistry class you can add/remove MRU values under key:

HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default

and

HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers
0
 
LVL 19

Accepted Solution

by:
Thommy earned 500 total points
ID: 37741532
Programmatically set following registry key from your Delphi Programm:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\fDenyTSConnections

0 = Connection allowed,
1 = Connection not allowed

An introduction to working with Windows Registry
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

932 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

8 Experts available now in Live!

Get 1:1 Help Now