Difference between revisions of "Putty"
From WPKG | Open Source Software Deployment and Distribution
(Update to 0.61, uninstaller still doesn't work silently so leave the workaround in place) |
(Modified to work on 32bit and 64bit systems) |
||
Line 2: | Line 2: | ||
[http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty] is an [http://www.openssh.org SSH] (and other secure protocol) client which allows you to open a terminal to your Unix server from Windows. | [http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty] is an [http://www.openssh.org SSH] (and other secure protocol) client which allows you to open a terminal to your Unix server from Windows. | ||
− | == Installer == | + | == Installer (32bit package works on 32bit and 64bit systems) == |
<source lang="xml"> | <source lang="xml"> | ||
Line 12: | Line 12: | ||
reboot="false"> | reboot="false"> | ||
− | <variable name="version" value="0. | + | <variable name="version" value="0.62" /> |
<check type="uninstall" condition="exists" path="PuTTY version %version%" /> | <check type="uninstall" condition="exists" path="PuTTY version %version%" /> | ||
Line 20: | Line 20: | ||
<upgrade cmd='%SOFTWARE%\putty\putty-%version%-installer.exe /sp- /verysilent' /> | <upgrade cmd='%SOFTWARE%\putty\putty-%version%-installer.exe /sp- /verysilent' /> | ||
− | <remove cmd='%COMSPEC% /c copy "%SYSTEMROOT%\system32\print.exe" "%PROGRAMFILES%\PuTTY\putty.exe"' /> | + | <remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES%\PuTTY\putty.exe" %COMSPEC% /c copy "%SYSTEMROOT%\system32\print.exe" "%PROGRAMFILES%\PuTTY\putty.exe"' /> |
− | <remove cmd='"%PROGRAMFILES%\PuTTY\unins000.exe" /sp- /verysilent /norestart' > | + | <remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES(X86)%\PuTTY\putty.exe" %COMSPEC% /c copy "%SYSTEMROOT%\system32\print.exe" "%PROGRAMFILES(X86)%\PuTTY\putty.exe"' /> |
+ | |||
+ | <remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES%\PuTTY\unins000.exe" "%PROGRAMFILES%\PuTTY\unins000.exe" /sp- /verysilent /norestart'> | ||
<exit code="1" /> | <exit code="1" /> | ||
</remove> | </remove> | ||
− | <remove cmd='%COMSPEC% /c rmdir /s /q "%PROGRAMFILES%\PuTTY"' /> | + | <remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES(X86)%\PuTTY\unins000.exe" "%PROGRAMFILES(X86)%\PuTTY\unins000.exe" /sp- /verysilent /norestart'> |
+ | <exit code="1" /> | ||
+ | </remove> | ||
+ | |||
+ | <remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES%\PuTTY" %COMSPEC% /c rmdir /s /q "%PROGRAMFILES%\PuTTY"' /> | ||
+ | <remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES(X86)%\PuTTY" %COMSPEC% /c rmdir /s /q "%PROGRAMFILES(X86)%\PuTTY"' /> | ||
+ | |||
</package> | </package> | ||
</source> | </source> |
Revision as of 15:43, 28 February 2013
This is a silent installer and uninstaller for Putty.
Putty is an SSH (and other secure protocol) client which allows you to open a terminal to your Unix server from Windows.
Installer (32bit package works on 32bit and 64bit systems)
<package
id="putty"
name="PuTTY"
revision="%version%"
priority="0"
reboot="false">
<variable name="version" value="0.62" />
<check type="uninstall" condition="exists" path="PuTTY version %version%" />
<install cmd='%SOFTWARE%\putty\putty-%version%-installer.exe /sp- /verysilent' />
<upgrade cmd='%SOFTWARE%\putty\putty-%version%-installer.exe /sp- /verysilent' />
<remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES%\PuTTY\putty.exe" %COMSPEC% /c copy "%SYSTEMROOT%\system32\print.exe" "%PROGRAMFILES%\PuTTY\putty.exe"' />
<remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES(X86)%\PuTTY\putty.exe" %COMSPEC% /c copy "%SYSTEMROOT%\system32\print.exe" "%PROGRAMFILES(X86)%\PuTTY\putty.exe"' />
<remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES%\PuTTY\unins000.exe" "%PROGRAMFILES%\PuTTY\unins000.exe" /sp- /verysilent /norestart'>
<exit code="1" />
</remove>
<remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES(X86)%\PuTTY\unins000.exe" "%PROGRAMFILES(X86)%\PuTTY\unins000.exe" /sp- /verysilent /norestart'>
<exit code="1" />
</remove>
<remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES%\PuTTY" %COMSPEC% /c rmdir /s /q "%PROGRAMFILES%\PuTTY"' />
<remove cmd='%COMSPEC% /c if exist "%PROGRAMFILES(X86)%\PuTTY" %COMSPEC% /c rmdir /s /q "%PROGRAMFILES(X86)%\PuTTY"' />
</package>
PuTTY 0.58+ uninstallers call 'putty -cleanup-during-uninstall' during uninstall. This causes a pop-up to appear which breaks the silent uninstall. As shown above, a fix for this is to copy simple program that always returns over putty.exe. The entire program folder is also removed so that any leftover unins000.exe files from failed uninstalls are removed.
Standalone
Here's a package.xml for distributing the putty.exe without the installer. It installs to the System32 folder in %SYSTEMROOT% (often c:\windows\system32) for quick Start/Run access.
<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package
id="putty"
name="Putty"
revision="0"
reboot="false"
priority="0">
<check type="file" condition="exists" path="%SYSTEMROOT%\system32\putty.exe"/>
<install cmd='cmd.exe /C copy /y %SOFTWARE%\putty\putty.exe %SYSTEMROOT%\system32\'/>
<remove cmd='cmd.exe /C del %SYSTEMROOT%\system32\putty.exe'/>
<upgrade cmd='cmd.exe /C copy /y %SOFTWARE%\putty\putty.exe %SYSTEMROOT%\system32\'/>
</package>
</packages>