I have many PuTTY sessions on my main work PC. I need to ensure I have all the sessions available for my support laptop at home, also I need them in case I am carrying aroung my small netbook and I need to connect to work. I use the script below to make a copy of the PuTTY registry key to both my local PC hard drive and to my dropbox folder so I can access them from any machine.
It's a very simple batch file, please feel free to copy and distribute the script.
Listed below is the script, you can copy and paste the script from here or you can download the batch file from here
REM The above command turns off the output for the script
REM Name : putty_backup.bat
REM Author : Craig Richards
REM Created : 19th-January-2011
REM Version : 1.1
REM Modified : 1.1 - Craig Richards - 13th September 2011 - Edited the script to create variables for the filename and the registry key
REM Also used the Windows environment variables %SYSTEMDRIVE% and %USERPROFILE%
REM %SYSTEMDRIVE% = Drive containing Windows root directory usually c:\
REM %USERPROFILE% = C:\Documents and Settings\Username
REM Instructions : From the command line, just type putty_backup.bat, or double click on the file in windows explorer
REM Variable Settings
REM This will create a variable called date, the format is DD-MM-YYYY
For /f "tokens=1,2,3 delims=/ " %%a in ('date /t') do (set date=%%a-%%b-%%c)
REM This sets the variable for the backup file name
REM This sets the variable for the registry key that is getting backed up
REM Main Program
REM The /e is for part of the registry, in this case the key listed above in the variable regkey
REM The /a is for ASCII output, if you omit the /a the file will be twice a large
regedit /ea %SYSTEMDRIVE%\%bck_file% %regkey%
regedit /ea "%USERPROFILE%\My Documents\My Dropbox\%bck_file%" %regkey%
I am always interested in feedback so please feel free to add any comments, or you can mail me here. If you would like to submit a quick tip with full credit and links back to your site then also feel free to contact me.