Creating RDP Batch Files Tutorial

Sep 5, 2024

RDP Batch File Creation Tutorial

Overview

  • Focus on creating RDP batch files for remote desktop connections.
  • RDP stands for Remote Desktop Protocol, used by Windows for remote connections.
  • Video is for educational purposes only.

Opening RDP

  • To open RDP:
    • Press Windows + R
    • Type mstsc and press Enter.
  • User interface allows input of:
    • Computer's domain name or IP address
    • Username (optional)
    • Display settings and other options
  • Click Connect to establish the remote connection.

Creating the Batch File

  • Goal: To automate the connection with username and password using a batch file.

Command Line Options

  • Open Command Prompt and type mstsc to see available options.
  • Important options mentioned:
    • Connection file: saves settings for automatic connections.
    • /v specifies server and port.

Testing the Batch File

  • Load Windows 10 Virtual Machine (VM) for testing.
  • Get the hostname using the command hostname.
  • Test connection via mstsc /v:hostname and enter credentials.

Storing Credentials

  • Use a program called CMDKey to add credentials for automatic use:
    • Example command: CMDKey /add:hostname /user:user /pass:password
  • This allows successful connection without credential prompts.

Writing the Batch File

  • Use Notepad++ for batch file creation.
  • Set syntax highlighting to batch.
  • Basic structure:
    • @echo off
    • Add credentials with CMDKey.
    • Execute mstsc /v:hostname to connect.
    • Optionally delete the stored credentials after connecting using CMDKey:
      • CMDKey /delete:targetname

Improving User Experience

  • Hide CMDKey commands to make the batch process look cleaner.
  • Consider GUI enhancements using input fields and message boxes (reference to previous video).

Conclusion

  • Encouragement to experiment with features in batch files.
  • Request for comments with video suggestions (e.g., multi-tool tutorial, virtual machine tutorial).
  • Reminder to like, subscribe, and join the private community.