Opening RDP from VB

Posted on 2006-05-31
Last Modified: 2012-05-05

Im trying fire RDP from a VB6 app populating the Computer, User, Password and Domain boxes with relevant details?

Anyone any idea how to do this??

Thanks in advance!
Question by:LFMSupport
    LVL 6

    Expert Comment

    Sorry, but what does your RDP mean?
    LVL 1

    Author Comment

    Sorry, I mean Remote Desktop Connection through Windows XP.
    LVL 5

    Accepted Solution

    Launching RDP programatically requires nothing more than the following:

    Shell "%SystemRoot%\System32\mstsc.exe"

    For the command line options, take a look at


    From what I can see, without manually creating an RDP file, you can only set the remote machine to connect to, by using /v:<server[:port]>

    From what I can see with RDP formats (opened up and RDP file in a hex editor) they aren't too hard to edit. You need to take a look at one. For some reason Notepad and Wordpard refuse to show the correct characters, but if you open it up in a hex editor (I'm using Hex Workshop) then it should reveal itself to be quite self explanatory. The password hash section is not something you're going to be able to change though...

    Only other option I can see is using APIs (like FindWindow, etc) to edit the values of the textbox after the program appears.
    LVL 18

    Assisted Solution

    LVL 1

    Author Comment

    Thanks burningmace and sethi!

    you might wanna take a look at

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    745 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

    16 Experts available now in Live!

    Get 1:1 Help Now