Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Mr. Muskrat (4572)

Mr. Muskrat
  reversethis-{moc ... ta} {tarksum.rm}

I'm married with 2 girls. I work as a full time Perl programmer for a Land Mobile Radio company in the Dallas/Fort Worth area.

I am enrolled at the Art Institute of Pittsburgh - Online working towards a Bachelor of Science in photography.

My other blog []

Journal of Mr. Muskrat (4572)

Monday February 16, 2004
11:09 PM

PuTTY on my USB keychain drive

[ #17451 ]
Today I moved PuTTY to my USB keychain drive (it's an Handy Steno 2.0 256MB). I slightly modified the instructions given in the PuTTY help file.

My configuration is imported into the registry prior to starting PuTTY. It's exported again when I'm done so that any changes that I make are stored. Then the registry keys are deleted.

I made a directory "putty" on my USB keychain drive and created the following files in it:

:: putty.bat ::
:: At work my USB drive is E: but at home it is F.
:: Adjust the next two lines for your setup.
set USB=E
if !%COMPUTERNAME%! == !Your_Computer_Name_Here! set USB=F
regedit /s putty.reg
echo REGEDIT4 >puttyrnd.reg
echo. >>puttyrnd.reg
echo [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY] >>puttyrnd.reg
set foo="RandSeedFile"="%USB%:\\putty\\putty.rnd"
echo %foo% >>puttyrnd.reg
echo. >>puttyrnd.reg
echo [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\dev1] >>puttyrnd.reg
set foo="PublicKeyFile"="%USB%:\\putty\\public.key"
echo %foo% >>puttyrnd.reg
regedit /s puttyrnd.reg
start /w putty.exe
regedit /e puttynew.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
copy puttynew.reg putty.reg >>nul
del puttynew.reg
regedit /s puttydel.reg

      8< - - - - - - - - - - - - - - - - - - >8

; puttydel.reg


      8< - - - - - - - - - - - - - - - - - - >8

I exported my registry information into putty.reg using regedit /e putty.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY. I imported the information in puttyrnd.reg into the registry by double-clicking the file. (Once it is imported, feel free to delete it, I did.) Next I moved all of my PuTTY files from the hard drive to the USB drive in the putty directory. Next, I started up a command prompt (you remember DOS don't you?). I changed into the putty directory on my USB drive. I ran putty.bat. When I exited out of PuTTY, all of my settings were saved. If I make changes while in a PuTTY session, those changes are saved as well. Very nice.

Updated: putty.bat to properly handle the %USB% environment variable.

Updated: Added export info. Thanks simonflk!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.