How to fully automate MS Remote Desktop logon

  • Want to start MS remote desktop session from KeyPass. I can get all the elements there, but can't get it to play nice.

    -using XP Pro,SP2, KeePass v1.04-

    I connect to multiple customer servers through MS RDP, Citrix, blah blah. Plan is to put connect/logon in one handy, secure place.

    The Plan: Start Remote Desktop client, fill in target, logon, password ... get connected.


    TITLE = RandomCustomer Co.
    URL = cmd://C:\WINDOWS\system32\mstsc.exe
    USERNAME = JustMe
    PASSWORD = JustPass

    Auto-Type-Window:Remote Desktop Connection*

    1. Target window are not unique.
    2. Have to do 3 sequences to get connected.
    3. Offends my sense of 'what's right' to not be able to just select the right entry and go.

    So. How to start an application, then follow right along and start an Auto-Type sequence?

    • Answered my own question: Use CTRL-V to launch the Auto-Type directly.

      For those who might want to know, the command to launch a Remote Desktop connection looks like this:

      Auto-Type:{DELAY=20}@rmstsc.exe /EDIT"{APPDIR}\default.rdp"~{DELAY 500}{APPACTIVATE Remote Desktop Connection}{DELAY=0} %C{URL} {TAB} {USERNAME} {TAB} {PASSWORD}%N

      Hints to maybe add to the document:

      -If WIN-R is acting oddly up the DELAY=n value. Found that the ENTER would get lost if DELAY was less than 20

      -{WIN}r and @r are NOT equal.