Changes

Jump to: navigation, search

Unison

3,132 bytes added, 19:03, 19 May 2011
no edit summary
</package>
</source>
 
A slightly more sophisticated version using PuTTY agent to manage SSH key and sets up the menu shortcuts appropriately. This requires a small .bat file (below) and nircmd.exe to be included in the install directory. You will need to ensure that you have generated the private keys appropriately and have copied them onto your machines etc.
 
<source lang="xml">
<packages>
<package id="unison" name="Unison" revision="20110517.3" priority="10" reboot="false" >
<depends package-id="putty" />
<depends package-id="pkgvcruntime2008" />
<depends package-id="gkt-runtime" />
<check type="logical" condition="and">
<check type="execute" path='%COMSPEC% /C if defined UNISONLOCALHOSTNAME (exit /B 0) else (exit /B 1)' condition="exitcodeequalto" value="0"/>
<check type="file" condition="exists" path='%PROGRAMFILES%\unison\Unison-2.32.52 Gtk+.exe' />
<check type="file" condition="exists" path='%PROGRAMFILES%\unison\Unison-2.32.52 Text.exe' />
<check type="file" condition="exists" path='%PROGRAMFILES%\unison\ssh.exe' />
<check type="file" condition="exists" path='%PROGRAMFILES%\unison\nircmd.exe' />
<check type="file" condition="exists" path='%PROGRAMFILES%\unison\unison-with-putty-2.32.52.bat' />
</check>
<install cmd='%COMSPEC% /C mkdir "%PROGRAMFILES%\unison"' >
<exit code="0" />
<exit code="1" />
</install>
<install cmd='%COMSPEC% /C xcopy /Y /R "%SOFTWARE%\Utilities\unison\*" "%programfiles%\unison\"' />
<install cmd='"%SOFTWARE%\wpkg\tools\3rd-party\nircmd-x32\nircmdc.exe" shortcut "~$folder.programfiles$\unison\nircmd.exe" "~$folder.common_start_menu$\Programs\File Utilities" "Unison" "exec hide ~$folder.programfiles$\unison\unison-with-putty-2.32.52.bat" "~$folder.programfiles$\unison\Unison-2.32.52 Gtk+.exe"'>
<exit code="4206857" />
</install>
<install cmd='%COMSPEC% /C reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v UNISONLOCALHOSTNAME /d %COMPUTERNAME%' >
<exit code="0" reboot="delayed" />
</install>
<upgrade cmd='%COMSPEC% /C mkdir "%PROGRAMFILES%\unison"' >
<exit code="0" />
<exit code="1" />
</upgrade>
<upgrade cmd='%COMSPEC% /C xcopy /Y /R "%SOFTWARE%\Utilities\unison\*" "%programfiles%\unison\"' />
<upgrade cmd='"%SOFTWARE%\wpkg\tools\3rd-party\nircmd-x32\nircmdc.exe" shortcut "~$folder.programfiles$\unison\nircmd.exe" "~$folder.common_start_menu$\Programs\File Utilities" "Unison" "exec hide ~$folder.programfiles$\unison\unison-with-putty-2.32.52.bat" "~$folder.programfiles$\unison\Unison-2.32.52 Gtk+.exe"'>
<exit code="4206857" />
</upgrade>
<upgrade cmd='%COMSPEC% /C reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v UNISONLOCALHOSTNAME /d %COMPUTERNAME%' >
<exit code="0" reboot="delayed" />
</upgrade>
 
<remove cmd='%COMSPEC% /C rmdir /S /Q "%PROGRAMFILES%\unison"' />
 
</package>
</packages>
</source>
 
Contents of unison-with-putty-2.32.52.bat
<source>
@echo off
"%programfiles%\putty\pageant.exe" "path-to-your-private-key.ppk" -c "%programfiles%\unison\Unison-2.32.52 Gtk+.exe"
</source>
 
[[Category: Silent Installers]]
0
edits

Navigation menu