I have been using a piece of open source software called mRemote (multi-Remote) for a few years. mRemote is an application that allows users to manage multiple remote desktop connections. While it has many useful features (i.e.: it can connect to SSH, VNC, and RDP from one interface), the main features I like about mRemote are: tabbed remote desktop sessions and the creation of a configuration file to “bookmark” your connections. Unfortunately, the development of mRemote had ceased when the primary developer Felix Deimel started working for a company with a similar (paid) product called Royal TS. Personally, Royal TS sounds amazing (cross platform, syncing of configurations, etc.), but my company won’t pay for it.
When I arrived at my current company, I installed a new fork of the old open source mRemote application called mRemoteNG (multi-Remote Next Generation). I set up the application with all of our servers in a configuration file, but wanted to share with my co-workers, so I wrote the .bat file below to allow my co-workers to share my custom configuration file. This script is very simple and asks for input (u for upload, d for download, and q for quit). You’ll need to modify the script to work in your environment (change the variable for the remote path and confirm the variable for the local path) and you’ll need to make sure you have a Windows share setup that other users can access.
If you’re not planning to share the configuration file, this script could also be used to backup a configuration file – you could change the paths to a personal share or a DropBox folder.
@echo off REM Author: Your Name Here REM Date Updated: Date REM Purpose: CLI for updating an mRemote configuration file. REM explain usage echo. echo u - uploads your local mRemote configuration to the server. echo d - downloads the server mRemote configuration to your computer. echo q - quits program. echo. REM define global variable for server path set serverpath=\\server\share$\path\to\config\file\confCons.xml set localpath=C:\Users\%username%\AppData\Roaming\mRemoteNG\confCons.xml REM go to startingpoint function goto startingpoint REM startingpoint function - displays options and directs to other functions based on selection :startingpoint set /p task="Press (u)pload, (d)ownload, (q)uit: " IF %task%==u (goto upload) IF %task%==d (goto download) IF %task%==q (goto done) IF NOT %task%==d IF NOT %task%==u (goto notvalid) REM download function - downloads the configuration file from the server to the local hard drive (and creates local backup) :download echo. echo Creating backup and downloading file ... copy /V /Y %localpath% %localpath%_BACKUP copy /V /Y %serverpath% %localpath% goto done REM upload function - uploads the configuration file from the local hard drive to the server (and creates remote backup) :upload echo. echo Creating backup and uploading file ... copy /V /Y %serverpath% %serverpath%_BACKUP copy /V /Y %localpath% %serverpath% goto done REM notvalid function - if a user does not press u, d, or q, function explains usage again and takes back to starting point :notvalid echo. echo Not a valid choice ... echo Acceptable choices are: echo u - upload echo d - download echo q - quit echo ... Please try again. echo. goto startingpoint REM done function - exits program :done echo. pause