Click here to Skip to main content
Click here to Skip to main content

Palantir - Remote Desktop Manager

, 6 Aug 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
Palantir is an application that allows users to manage remote desktop connections in one window. It also allows users to save existing connections for later use.
Screenshot - palantir.jpg

Screenshot - palantir3.jpg


Palantir is an application that allows users to manage remote desktop connections in one window. It also allows users to save existing connections for later use.


The remote desktop connections are managed with Microsoft RDP Client control. This control has all of the properties such as Server, UserName, Domain, etc. in order to set up a remote desktop connection. In addition to these properties, sharing printers, disk drives or color depth of the remote desktop can be managed via RDP Client control. Palantir enables users to create a remote desktop connection and save connection settings for later use. Users can also choose to start a remote desktop connection automatically when the application starts.

The settings can be saved into a file and restored from a setting file. Users can also connect to a computer via console. The application has a class named Machine that stores a remote desktop connection's properties. All of the remote connections created by user is stored in application's .settings file. This setting file has a property setting named MyMachine and its type is string. This property is converted into Hashtable while getting the settings. Palantir's solution consists of four projects which are GUI, Helper, BusinessObjects and a setup project.

Using the Code

The remote desktop connections are retrieved by the function below:

public List<Machine> GetRemoteDesktops()         
    List<Machine> lstMachine = new List<Machine>();             
    if (Settings.Default.MyMachine != "")             
        Hashtable ht = 
        foreach (DictionaryEntry de in ht)                     
            Machine insMachine = (Machine)de.Value;                     
    lstMachine.Sort(delegate(Machine m1, Machine m2) 
        return m1.RemoteDesktopConnectionName.CompareTo(
    return lstMachine;         

As seen in the code, this function deserializes the setting named MyMachine into a hashtable and inserts each dictionary entry in the hashtable into a list and returns the list. A remote desktop connection is saved and edited by the function below:

public bool SaveRemoteDesktop(Machine parMachine, bool openedForEdit)   
    if (Settings.Default.MyMachine == "")
        Hashtable ht = new Hashtable(); 
        Settings.Default.MyMachine = BinarySerializer.ToBinary(ht); 
    Hashtable ht1 = 
    if (!parMachine.SavePassword) 
        parMachine.Password = "";             
    if (!openedForEdit)             
        foreach (DictionaryEntry de in ht1)                 
            if (((Machine)de.Value).RemoteDesktopConnectionName == 
                MessageBox.Show("There is already a 
                                    remote connection with the same name.");                         
                return false;                     
    ht1[parMachine.RemoteDesktopConnectionName] = parMachine; 
    Settings.Default.MyMachine = BinarySerializer.ToBinary(ht1);
    return true; 

If there's no currently saved remote desktop connection, we create a new hashtable and then serialize and save the settings file. After that, we deserialize the settings parameter into a hashtable and after checking if there's another connection with the same name, we save the remote desktop connection with the function's parameter Machine object. The methods below set the RDP Client control's settings and connect to the remote desktop which is passed as parameter.

private void SetRdpClientProperties(Machine parMachine)   
    rdpc.Server = parMachine.MachineName;             
    rdpc.UserName = parMachine.UserName;             
    rdpc.Domain = parMachine.DomainName;             
    if (parMachine.Password != "")             
        rdpc.AdvancedSettings5.ClearTextPassword = parMachine.Password;   
    rdpc.AdvancedSettings5.RedirectDrives = parMachine.ShareDiskDrives;     
    rdpc.AdvancedSettings5.RedirectPrinters = parMachine.SharePrinters; 
    rdpc.ColorDepth = (int)parMachine.ColorDepth;             
    rdpc.Dock = DockStyle.Fill;           
public void Connect(Machine parMachine)         
public void ConnectViaConsole(Machine parMachine)         
    rdpc.AdvancedSettings5.ConnectToServerConsole = true;    


For bug reports and suggestions, feel free to contact me at


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Isil Orhanel
Web Developer
Turkey Turkey
No Biography provided

Comments and Discussions

GeneralError with mstscax.dll PinmemberMember 393854815-Jan-09 18:33 
Questionerror!!!!. what pas? PinmemberAlejandroDG17-Oct-08 20:42 
AnswerRe: error!!!!. what pas? Pinmemberric43215-Nov-09 5:53 
Generalplease clear my doubt... [modified] Pinmembersgsiva18-Sep-08 0:44 
AnswerRe: please clear my doubt... PinmemberJim Weiler19-Nov-08 19:33 
GeneralRe: please clear my doubt... PinmemberKevin James10-Feb-09 23:20 
Questionpocket pc version? PinmemberJeff Dafing17-Aug-08 9:10 
QuestionBuild errors with VS 2005 Pinmembercuriousharry22-Sep-07 16:16 
AnswerRe: Build errors with VS 2005 PinmemberGrantS23-Oct-07 23:40 
GeneralGreat.. PinmemberMurat Firat12-Sep-07 8:11 
QuestionQuery PinmemberRajendrakumara24-Aug-07 21:15 
GeneralWorked at office, error at home Pinmemberzafer_arsay13-Aug-07 23:30 
QuestionWhat is in this name? PinmemberSAKryukov9-Aug-07 13:02 
AnswerRe: What is in this name? PinmemberSacha Barber9-Aug-07 21:48 
Its a seeing stone in Lord of the Rings if im not mistaken.

One can see the dark lord AKA the flaming eye in it. Saruman has one, so does the steward of gondor.


Sacha Barber
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?

My Blog :

AnswerRe: What is in this name? Pinmemberpauljenkins71425-Mar-10 23:20 
GeneralAlready better than MS RDP client, yet needs improvements [modified] PinmemberSAKryukov9-Aug-07 13:00 
GeneralSome fix... [modified] Pinmembercacalex8-Aug-07 4:07 
Generalcool improvement... Pinmembercacalex7-Aug-07 7:26 
NewsClipboard support PinmemberVance Kessler7-Aug-07 6:24 
GeneralGood job and ... good name PinmemberCrusty Applesniffer7-Aug-07 1:22 
GeneralHave you seen.... PinmemberPeter Tewkesbury7-Aug-07 0:01 
AnswerRe: Have you seen.... PinmemberIsil Orhanel7-Aug-07 0:32 
GeneralRe: Have you seen.... PinmemberVishal.Doshi7-Aug-07 6:25 
GeneralRe: Have you seen.... Pinmemberdherv1-Oct-07 10:17 
GeneralRe: Have you seen.... PinmemberDanilo Corallo19-Oct-07 2:19 
QuestionAnother exception, do I need TSC 6.0? PinmemberNickViz6-Aug-07 22:31 
AnswerRe: Another exception, do I need TSC 6.0? PinmemberIsil Orhanel7-Aug-07 0:14 
GeneralRe: Another exception, do I need TSC 6.0? Pinmemberliangpz_200013-Sep-07 20:38 
AnswerRe: Another exception, do I need TSC 6.0? PinmemberCarlos Solorzano6-Mar-08 11:27 
GeneralRe: Another exception, do I need TSC 6.0? Pinmemberwongyeam31-Jan-09 21:37 
Generalidenty Pinmemberidenty6-Aug-07 13:35 
Questionhow can I connect to console? Pinmembermargiex6-Aug-07 4:32 
AnswerRe: how can I connect to console? PinmemberIsil Orhanel6-Aug-07 23:22 
QuestionHow to use it? PinmemberBarCode3-Aug-07 0:00 
AnswerRe: How to use it? PinmemberIsil Orhanel6-Aug-07 23:40 
GeneralWonderful! PinmemberEylon Yogev.2-Aug-07 10:10 
GeneralSuperb Pinmemberrippo2-Aug-07 8:58 
GeneralGood work... Pinmemberfadee2-Aug-07 7:07 
GeneralNice article - Superb title! PinmemberIain Clarke2-Aug-07 5:17 
Generalvery good PinmemberLuiz_Augusto2-Aug-07 4:15 
GeneralException PinmemberE.Glashagen2-Aug-07 1:28 
GeneralRe: Exception Pinmembersephus62-Aug-07 5:53 
AnswerRe: Exception PinmemberIsil Orhanel7-Aug-07 0:37 
GeneralRe: Exception PinmemberSönke Cordts14-Aug-07 4:55 
Generalgood article Pinmembermargiex2-Aug-07 0:59 
GeneralExcellent Work PinmemberTamer Oz1-Aug-07 22:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150414.1 | Last Updated 7 Aug 2007
Article Copyright 2007 by Isil Orhanel
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid