Skip Ribbon Commands
Skip to main content

Distribution

:

Application Configuration Notes: PuTTY 0.60

Documentation and logs for UVM OS and application distribution methodologies
Putty supports a simple silent using the "silent" switch, thus:
putty-0.59-installer.exe /silent
 
Unfortunately, customizing the product to pre-populate SSH profiles into the product is complicated by the fact that PuTTY users the HKCU (current user) registry hive for all user settings.  This means that we can only control settings for the currently logged in user.
 
Fortunately, this is not a huge problem for new installs as we can populate the registry setting into the HKU\.Default registry tree and custom settings will be copied to any new user profile on the system.  As this deployment system is intended primarially for new computer deployments, we should not have a problem.  However, I have added code to allow manual import of Zoo profiles settings into the current user's registry (we accomplish this by adding a shortcut to the start menu which points to a registry import file).  The "REM" lines in the installation script code below describe this process:

@echo off
REM Unattended installation script for PuTTY
REM Includes UVM Custom Settings file
REM JGM: 2007-04-09
 
:Install
start /wait putty-installer.exe /silent
REM Import zoo.uvm.edu profile into the current and default user registry using import files:
reg import uvm_putty_current.reg
reg import uvm_putty_default.reg
REM Copy the current user registry import file to the local system for later use:
copy /y /v uvm_putty_current.reg "%programfiles%\putty\uvm_putty_current.reg"
GOTO OSVer
 
:OSVer
REM Determine current OS Version
set OSVer=noSup
ver | find /i "5.1." && set OSVer=XP
ver | find /i "6.0." && set OSVer=Vista
IF %OSVer%==XP GOTO XPShort
IF %OSVer%==Vista GOTO VistaShort
IF %OSVer%==noSup GOTO unsupported
 
:XPShort
REM copy "Add 'zoo.uvm.edu' profile to current user" Start Menu shortcut using XP directory structure
copy /y /v "Create 'Zoo' profile for current user.lnk" "%AllUsersProfile%\Start Menu\Programs\PuTTY\"
goto END
 
:VistaShort
REM copy "Add 'zoo.uvm.edu' profile to current user" Start Menu shortcut using Vista directory structure
copy /y /v "Create 'Zoo' profile for current user.lnk" "%ProgramData%\Microsoft\Windows\Start Menu\Programs\PuTTY\"
goto END
 
:Unsupported
cls
ECHO The software was installed successfully, but...
ECHO .
ECHO Installation of UVM Custom shortcuts is not supported on this system.
ECHO Upgrade to Windows Vista or XP Professional for full support from ETS.
pause
GOTO END
 
:END

Contents of the "uvm_putty_xxx.reg" files noted in the script can be found below...

Default tree:


Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\Sessions]

[HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\Sessions\zoo.uvm.edu]
"Present"=dword:00000001
"HostName"="zoo.uvm.edu"
"X11Forward"=dword:00000001


Current User hive:


Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions]

[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\zoo.uvm.edu]
"Present"=dword:00000001
"HostName"="zoo.uvm.edu"
"X11Forward"=dword:00000001