Menu

Help with Remote Desktop Conection on XP

Help
2006-05-25
2012-11-19
  • Nobody/Anonymous

    I am having trouble figuring out how to login to remote PC dealing with two login screens. Anyone know how to do this?
    Thanx

     
    • Nobody/Anonymous

      MS REMOTE DESKTOP is the Application I am talikng about on
      windows xp

      %SystemRoot%\System32\mstsc.exe

       
    • Nobody/Anonymous

      I can Save my *.rdp connection file with password in it, as an encrypted attachment to a blank entry with just a title in keepass, but I would like to be able to run it with one click, and not have to save it to disk before running the file.

      Is this going in the wrong direction?

       
    • Paul

      Paul - 2006-05-25

      I would try KeePrg (part of KeeForm) to do this.

      cheers, Paul

       
    • Nobody/Anonymous

      tried that but haven't figured out the url string I need for keepass.
      I am having trouble and wanted to know if anyone else has the url already figured out.
      I can't be the only person who uses RDP can I?
      And it is KeePrg2

      Any help would be appreciated.

       
      • Nobody/Anonymous

        I have KeePass starting MS Remote Desktop connections working well. One nice feature of my solution is that it uses the 'standard' meanings of the KeePass form fields.

        What I did is this:
        1. Create a generic default.rdp with your default settings, leave URL, UserName, PW blank. Put it the .\KeePass folder (aka %APPDIR%)

        2. Create a new KeePass entry, and set Title, UserName, URL, Password to infos for RDP account

        3. For the new entry set AutoType to:
        Auto-Type:{DELAY=20}@r{DELAY500}mstsc.exe /EDIT"{APPDIR}\default.rdp"~{DELAY500} {APPACTIVATE Remote Desktop}{DELAY100}%c{URL}{TAB}{USERNAME}{TAB}{PASSWORD}~

        4. Save entry.

        5. Place cursor on new entry, press CTRL-V to run it.

        Notes:
        Delays. There are three delays, one to slow down auto-type into the Windows Run box (mine set to 20) one to wait for mstsc.exe to start, another to wait for mstsc.exe to activate.
         
        If you get odd results try setting the delays higher. The Run window gets totally borked if the text goes in too fast.

        The .rdp files are just ASCII files. You can save the following in .\KeePass folder as "default.rdp" I employed a setting not on the GUI to get the window to pop full-sized when not full-screen. This one has desktop size set to 1152x864.
        ***begin default.rdp***
        screen mode id:i:1
        desktopwidth:i:1152
        desktopheight:i:864
        session bpp:i:15
        winposstr:s:0,3,0,0,800,600
        full address:s:
        compression:i:1
        keyboardhook:i:1
        audiomode:i:2
        redirectdrives:i:1
        redirectprinters:i:0
        redirectcomports:i:0
        redirectsmartcards:i:1
        displayconnectionbar:i:1
        autoreconnection enabled:i:1
        username:s:
        domain:s:
        alternate shell:s:
        shell working directory:s:
        disable wallpaper:i:1
        disable full window drag:i:1
        disable menu anims:i:1
        disable themes:i:0
        disable cursor setting:i:0
        bitmapcachepersistenable:i:1
        ***end default.rdp***

        -Ethan

         
        • Nobody/Anonymous

          New version of Remote desktop has been released by MS which seems to break this auto-type.

          Here's what I use for the new version.

          Auto-Type:{DELAY=20}@r{DELAY500}mstsc.exe /EDIT "{APPDIR}\default.rdp"~{DELAY500} {APPACTIVATE Remote Desktop}{DELAY100}%c{URL}{ENTER}+{TAB}{UP}{DEL}{USERNAME}{TAB}{PASSWORD}~{DELAY100}^y~

          Everything else is the same as the message posted 2006-06-23 12:09

           
    • Nobody/Anonymous

      The basic problem with "one click access" for Remote Desktop is that there is not window title you can wait for. All the data within the Remote Desktop is just a bitmap.

      There is an example script how to handle a Remote Desktop Conncetion on XP in the KeeForm zip file.

      You can adapt it to your needs, but you have to compile it yourself (there is no executable). This is fairly easy, just read the KeeForm readme file .

      User BSloth also used KeeRdp.au3 for Remote Desktop, I am sure if you send him an email, he will post his experience here

      https://sourceforge.net/users/bsloth/

      Hope this helps

      KeeRdp.au3:
      -----------
      ;Here is an example how to use the script with Keepass:
      ;cmd://KeeRdp {USERNAME} {PASSWORD} 192.168.0.3
      ;
      ;Please note that some of the strings in the script are
      ;language dependent. You have to adapt this to your language.
      ;Just look at the "winwaitactive" statements and it should
      ;clear what to do.
      ;

      Opt("WinTitleMatchMode", 2)

      If $CmdLine[0] <> 3 Then
          MsgBox (0, "Error", "Correct syntax is: KeyPrg Program Title Autotype")
          exit
      EndIf

      $Username   =  $CmdLine[1]
      $Password   = $CmdLine[2]
      $ipaddress = $CmdLine[3]

      Run("C:\WINDOWS\system32\mstsc.exe")

      WinWaitActive("Remote Desktop Connection")
      Send($ipaddress)
      Send("{ENTER}")
      WinWaitActive("- Remote Desktop")
      ;Sleep(5000)
      MsgBox (0, "Message", "Wait until login appears", "15")
      Send("!u")
      Send($Username,1)
      Send("!p")
      Send($Password,1)
      Send("{ENTER}")

       
    • Nobody/Anonymous

      Thank you very much for your advice. After awhile it all made sense. With a little help from a friend.

      GREAT APP!!
      Keep it up.

       
    • Nobody/Anonymous

      A few issues/fixes to the previous auto-type.

      1) This auto-type seems fail when connecting to a new server for the first time.  This is due to the "+{TAB}{UP}{DEL}" part but is necessary for every connection after that.

      2) The {UP} is not necessary but doesn't seem to cause a problem.

      Auto-Type:{DELAY=20}@r{DELAY500}mstsc.exe /EDIT "{APPDIR}\default.rdp"~{DELAY500} {APPACTIVATE Remote Desktop}{DELAY100}%c{URL}{ENTER}+{TAB}{DEL}{USERNAME}{TAB}{PASSWORD}~{DELAY100}^y~

       
      • Nobody/Anonymous

        I think there is a small error at the end of your auto-type. It should enter ALT+Y, not CTRL+Y.

        There is a my working auto-type below (XP SP2, RDP client):
        Auto-Type:{DELAY=20}@r{DELAY500}mstsc.exe /EDIT "{APPDIR}\default.rdp"~{DELAY800} {APPACTIVATE Remote Desktop}{DELAY100}%c{URL}{ENTER}+{TAB}{DEL}{USERNAME}{TAB}{PASSWORD}~{DELAY100}%y~

        I found a small problem with two or more keyboards (input languages) in my WXP (I have to use Czech as a default and English as an alternative). If keyboard in KeePass is different from the system default keyboard, Auto-Type writes bad characters in Run... window. But if both keyboards are the same as system default, Auto-type works fine.

        Let's compare
        System = Czech keyboard, KeePass = Czech keyboard
        mstsc.exe /EDIT "C:\Program Files\KeePass Password Safe\default.rdp"
        Result: working

        System = Czech keyboard, KeePass = English keyboard
        mstsc.exe {EDIT :C>Program FilesKeePass Password Safedefault.rdp:
        Result: not working

        System = English keyboard, KeePass = Czech keyboard
        mstsc.exe ÉDIT !C"¨Program Files¨KeePass Password Safe¨default.rdp!

        System = English, KeePass = English
        RDP windows runs, but values for server, username, password contain bad values

        Radek

         

Log in to post a comment.

Auth0 Logo