<?xml version="1.0" encoding="UTF-8"?>


<!--

Copyright (C) 2006-2011 Open Plan IT

Licence: GNU General Public License version 3 or later

Version: 1.7.25 - for Roaming Computing System (Windows Edition) 3.6.25

See http://thegoldenear.org/rcs/

Describe any localised changes here:
- 
- 
- 

-->

<packages>






<package
	id="microsoft-security-essentials"
	name="Microsoft Security Essentials"
	revision="7"
	reboot="false"
	priority="3" >

	<!-- The whitelisting is lost when MSE is uninstalled -->
	<chain
			package-id="tweak-unattended-mse-whitelist-ultravnc" />

	<check 
	    	type="uninstall"
	    	condition="exists"
	    	path="Microsoft Security Essentials" />

	<!-- Uninstall F-Prot Antivirus Updater Fix -->
	<!-- This goes before MSE so that it will run even if MSE fails -->
	<!-- This takes time to run so will need to be removed at some point in the future -->
	<install
			cmd="MsiExec.exe /qb /uninstall {F8A3A6BC-D68F-445B-B1BA-6F03A4352865}" >
		<exit
			code="3010" />
		<!-- Don't worry if it's not installed -->
		<exit
			code="1605" />
	</install>

	<!-- Note: it doesn't appear in the notification area until after a reboot -->
	<install
	    	cmd='%SOFTWARE%\microsoft-security-essentials\mseinstall.exe /s /runwgacheck /o' >
		<!-- If MSE is already installed it gives an error -->
		<exit
			code="-2147156213" />
	</install>

	<!-- Install the whitelisting direct from here, rather than using a separate package, because 'chain' doesn't automatically run what it chains to if the check succeeds; and a 'check' line using 'registry' can't use '\', requiring instead 'execute' to run a separate batch file to run 'reg query' which is getting overly complicated -->
	<!-- Note this will only run when running from the WPKG service running as SYSTEM (rather than running wpkg.js manually) because of permissions on the registry key -->
	<install
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\mse-whitelist-ultravnc.bat" '/>

	<!-- Uninstall F-Prot Antivirus Updater Fix-->
	<!-- This goes before MSE so that it will run even if MSE fails -->
	<!-- This takes time to run so will need to be removed at some point in the future -->
	<upgrade
			cmd="MsiExec.exe /qb /uninstall {F8A3A6BC-D68F-445B-B1BA-6F03A4352865}" >
		<exit
			code="3010" />
		<!-- Don't worry if it's not installed -->
		<exit
			code="1605" />
	</upgrade>

	<!-- The program updates itself with minor updates automatically, but we use the following to install major upgrades by just bumping the revision number -->
	<upgrade
			cmd='%SOFTWARE%\microsoft-security-essentials\mseinstall.exe /s /runwgacheck /o' >
		<!-- If MSE is already installed it gives an error -->
		<exit
			code="-2147156213" />
	</upgrade>

	<!-- Install the whitelisting direct from here, rather than using a separate package, because 'chain' doesn't automatically run what it chains to if the check succeeds; and a 'check' line using 'registry' can't use '\', requiring instead 'execute' to run a separate batch file to run 'reg query' which is getting overly complicated -->
	<!-- Note this will only run when running from the WPKG service running as SYSTEM because of permissions on the registry key -->
	<upgrade
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\mse-whitelist-ultravnc.bat" '/>

	<remove
		cmd='%SOFTWARE%\microsoft-security-essentials\mseinstall.exe /s /u'/>
</package>







	<package
		id="7-zip"
		name="7-Zip"
		revision="7"
		reboot="false"
		priority="3">

		<check
			type="registry"
			condition="exists"
			path="HKLM\Software\7-Zip\Path" />

		<install cmd="%SOFTWARE%\7-zip\7z465.exe /S" />

		<upgrade cmd="%SOFTWARE%\7-zip\7z465.exe /S" />

		<remove
			cmd="%PROGRAMFILES%\7-Zip\Uninstall.exe /S" />
	</package>







	<package
		id="adblock-plus"
		name="Ad-block Plus (Firefox extension)"
		revision="14"
		reboot="false"
		priority="3">

		<depends
			package-id="firefox" />

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}\components\AdblockPlus.js" />

    <upgrade
		cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\adblock-plus\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}" "%PROGRAMFILES%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}"' />
 
    <install
		cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\adblock-plus\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}" "%PROGRAMFILES%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}"' />

    <remove
		cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\Mozilla Firefox\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}"' />
	</package>






	<package
		id="ghostscript"
		name="Ghostscript"
		revision="10"
		reboot="false"
		priority="3" >

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\gs\gs8.63\bin\gswin32.exe" />

		<install
			cmd='cmd /c start /wait /d %SOFTWARE%\ghostscript\ %SOFTWARE%\ghostscript\setupgs.exe "%ProgramFiles%\gs"' />

		<!--  Upgrade removes previous program and fonts versions, 8.54 and 8.61; also the directories. Fonts were included with ghostscript from 8.63 onwards rather than being a seperate package -->

		<!-- Remove the ghostscript fonts -->
		<upgrade
			cmd='cmd /c "IF EXIST "%ProgramFiles%\gs\fonts\uninstal.txt" "%PROGRAMFILES%\gs\uninstgs.exe" "%ProgramFiles%\gs\fonts\uninstal.txt"" -q' />

		<!-- Remove version 8.54 -->
		<upgrade
			cmd='cmd /c "IF EXIST "%PROGRAMFILES%\gs\gs8.54\uninstal.txt" "%PROGRAMFILES%\gs\uninstgs.exe" "%PROGRAMFILES%\gs\gs8.54\uninstal.txt"" -q' />
		
		<!-- Remove version 8.61 -->
		<upgrade
			cmd='cmd /c "IF EXIST "%PROGRAMFILES%\gs\gs8.61\uninstal.txt" "%PROGRAMFILES%\gs\uninstgs.exe" "%PROGRAMFILES%\gs\gs8.61\uninstal.txt"" -q' />
		
		<!-- Remove redundant directory structure -->
		<upgrade
			cmd='cmd /c "IF EXIST "%PROGRAMFILES%\gs\nul.ext" rmdir "%PROGRAMFILES%\gs" /S"' />
		
		<upgrade
			cmd='cmd /c start /wait /d %SOFTWARE%\ghostscript\ %SOFTWARE%\ghostscript\setupgs.exe "%ProgramFiles%\gs"' />

		<remove
			cmd='cmd /c "IF EXIST "%PROGRAMFILES%\gs\gs8.63\uninstal.txt" "%PROGRAMFILES%\gs\uninstgs.exe" "%PROGRAMFILES%\gs\gs8.63\uninstal.txt""' />
	</package>
	
<package
		id="audacity"
		name="Audacity"
		revision="3"
		reboot="false"
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Audacity\audacity.exe" />

		<install
			cmd="%SOFTWARE%\audacity\audacity-win-1.2.6.exe /sp- /silent /nocancel /norestart /log" />

		<upgrade
			cmd="%SOFTWARE%\audacity\audacity-win-1.2.6.exe /sp- /silent /nocancel /norestart /log" />

		<remove
			cmd="%PROGRAMFILES%\Audacity\unins000.exe /silent /log /norestart" />
	</package>	
	
<!--	<package
		id="audacity"
		name="Audacity"
		revision="2"
		reboot="false"
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Audacity 1.3 Beta (Unicode)\audacity.exe" />

		<install
			cmd="%SOFTWARE%\audacity\audacity-win-unicode-1.3.9.exe /sp- /silent /nocancel /norestart /log" />

		<upgrade
			cmd="%SOFTWARE%\audacity\audacity-win-unicode-1.3.9.exe /sp- /silent /nocancel /norestart /log" />

		<remove
			cmd="%PROGRAMFILES%\Audacity\unins000.exe /silent /log /norestart" />
	</package> -->


<package
		id="adobe-reader"
		name="Adobe Reader"
		revision="9"
		reboot="false"
		priority="3">

		<check
			type="uninstall"
			condition="exists"
		    path="Adobe Reader 9" />

		<install
				cmd='msiexec /qb /package "%SOFTWARE%\adobe-reader\AcroRead.msi" TRANSFORMS="%SOFTWARE%\adobe-reader\AcroRead.mst"'>
			<exit
                 code="3010" /></install>

		<upgrade
			cmd='msiexec /qb /package "%SOFTWARE%\adobe-reader\AcroRead.msi" TRANSFORMS="%SOFTWARE%\adobe-reader\AcroRead.mst"'>
			<exit
				code="3010" /></upgrade>
		
		<remove cmd='msiexec /qb /uninstall "%SOFTWARE%\adobe-reader\AcroRead.msi"' />
			
</package>
		


<package
		id="ccleaner"
		name="CCleaner"
		revision="10"
		priority="3">
		
		<check 
			type="uninstall" 
			condition="exists" 
			path="CCleaner" />
		
		<install 
			cmd='"%SOFTWARE%\ccleaner\ccsetup226_slim.exe" /S' />
				
		<upgrade 
			cmd='"%SOFTWARE%\ccleaner\ccsetup226_slim.exe" /S' />
		
		<remove cmd='%PROGRAMFILES%\CCleaner\uninst.exe /S' />
		
	</package>






	<package
		id="enigmail"
		name="Enigmail (Thunderbird extension)"
		revision="7"
		reboot="false"
		priority="3">

		<depends
			package-id="thunderbird" />

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Thunderbird\extensions\{847b3a00-7ab1-11d4-8f02-006008948af5}\components\enigmail.js" />

		<install
			cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\enigmail\{847b3a00-7ab1-11d4-8f02-006008948af5}" "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{847b3a00-7ab1-11d4-8f02-006008948af5}"' />

		<upgrade
			cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\enigmail\{847b3a00-7ab1-11d4-8f02-006008948af5}" "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{847b3a00-7ab1-11d4-8f02-006008948af5}"' />
	
	<remove
		cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{847b3a00-7ab1-11d4-8f02-006008948af5}"' />
	</package>







	<package
		id="eraser"
		name="Eraser"
		revision="5"
		reboot="false"
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Eraser\eraser.exe" />

		<install
			cmd="cmd /C %SOFTWARE%\eraser\EraserSetup32.exe /S" />

		<upgrade
			cmd="cmd /C %SOFTWARE%\eraser\EraserSetup32.exe /S" />

		<remove
			cmd='msiexec /uninstall %SOFTWARE%\eraser\EraserSetup32.msi /qn /norestart' />
	</package>

				






<package
        id="foxit-reader"
        name="Foxit Reader"
        revision="12"
        reboot="false"
        priority="3">

		<check
			type="uninstall"
			condition="exists"
			path="Foxit Reader" />

		<!-- Uninstall 3.1.4.1125 or 3.3.0.0430 -->
		<install
			 cmd='msiexec /x {4FEC0D0D-1279-4C46-B6F8-B73C5247A6A9} /passive /norestart'>
			<exit code='1605' />
		</install>

		<!-- Uninstall 3.1.1.0901 -->
		<install
			 cmd='msiexec /x {A9355F41-AE6C-487C-A6A9-BC348D836F43} /passive /norestart'>
			<exit code='1605' />
		</install>

		<install cmd='msiexec /i "%SOFTWARE%\foxit-reader\FoxitReader331_enu.msi"  DESKTOP_SHORTCUT=0 VIEWINBROWSER=0 /QN /NORESTART ALLUSERS=1' />

		<!-- Register Foxit Reader as default .pdf viewer in case it doesn't achieve this automatically -->
		<install cmd='"%PROGRAMFILES%\Foxit Software\Foxit Reader\Foxit Reader.exe" -register' />

		<!-- Uninstall 3.1.4.1125 or 3.3.0.0430 -->
		<upgrade
			 cmd='msiexec /x {4FEC0D0D-1279-4C46-B6F8-B73C5247A6A9} /passive /norestart'>
			<exit code='1605' />
		</upgrade>

		<!-- Uninstall 3.1.1.0901 -->
		<upgrade
			 cmd='msiexec /x {A9355F41-AE6C-487C-A6A9-BC348D836F43} /passive /norestart'>
			<exit code='1605' />
		</upgrade>

		<!-- Uninstall (before reinstalling) current version 3.3.1.0518 because browser integration broken -->
		<upgrade
			 cmd='msiexec /x {648AF8B5-9F79-4ABA-8D59-83998F7E3E3F} /passive /norestart'>
			<exit code='1605' />
		</upgrade>

		<upgrade cmd='msiexec /i "%SOFTWARE%\foxit-reader\FoxitReader331_enu.msi"  DESKTOP_SHORTCUT=0 VIEWINBROWSER=0 /QN /NORESTART ALLUSERS=1' />

		<!-- Register Foxit Reader as default .pdf viewer in case it doesn't achieve this automatically -->
		<upgrade cmd='"%PROGRAMFILES%\Foxit Software\Foxit Reader\Foxit Reader.exe" -register' />

		<remove
			 cmd='msiexec /x {648AF8B5-9F79-4ABA-8D59-83998F7E3E3F} /passive /norestart'>
			<exit code='1605' />
		</remove>
	</package>











<package
		id="f-prot"
		name="F-Prot"
		revision="8"
		reboot="false"
		priority="0">
		<!-- F-Prot wants to reboot -->
 
		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\FRISK Software\F-PROT Antivirus for Windows\FPWin.exe" />

		<install
			cmd='msiexec /package %SOFTWARE%\f-prot\fpav-windows-x86-hc-en.msi /qn /norestart' >
			
			<exit
				code="3010" />

			<exit
				code="1619" />

			</install>
				
		<!-- Uninstall F-Prot -->
		<remove
				cmd='msiexec /uninstall %SOFTWARE%\f-prot\fpav-windows-x86-hc-en.msi /qn /norestart' >
			<exit
				code="3010" /></remove>

		<!-- Uninstall F-Prot Antivirus Updater Fix -->
		<remove
				cmd="MsiExec.exe /qb /uninstall {F8A3A6BC-D68F-445B-B1BA-6F03A4352865}" >
			<exit
				code="3010" />
			<!-- Don't worry if it's not installed -->
			<exit
				code="1605" />
		</remove>
</package>






	<package
		id="filezilla"
		name="FileZilla"
		revision="13"
		reboot="false"
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\FileZilla FTP Client\FileZilla.exe" />

		<install
			cmd="%SOFTWARE%\filezilla\FileZilla_3.3.0.1_win32-setup.exe /S" />

		<upgrade
			cmd="%SOFTWARE%\filezilla\FileZilla_3.3.0.1_win32-setup.exe /S" />

		<remove
			cmd='"%PROGRAMFILES%\FileZilla FTP Client\uninstall.exe" /S' />
	</package>






	
	<package 
		id="firefox" 
		name="Mozilla Firefox" 
		revision="36"
		reboot="false" 
		priority="3">

		<check
			type="uninstall"
			condition="exists"
			path="Mozilla Firefox (3.6.25)" />

		<install
			cmd="%SOFTWARE%\firefox\Firefox Setup 3.6.25.exe -ms" />

		<upgrade
			cmd="%SOFTWARE%\firefox\Firefox Setup 3.6.25.exe -ms" />

		<remove
			cmd="%PROGRAMFILES%\Mozilla Firefox\uninstall\helper.exe /S" />
	</package>






	<package
		id="flash-player-firefox"
		name="Flash Player (for Firefox)"
		revision="26"
		reboot="false"
		priority="3">

		<depends
			package-id="firefox" />

		<check
			type="file"
			condition="exists"
			path="%WINDIR%\System32\Macromed\Flash\NPSWF32.dll" />

		<install
			cmd="%SOFTWARE%\flash-player-firefox\flashplayer10_3r183_11_win.exe /install" />

		<upgrade
			cmd="%SOFTWARE%\flash-player-firefox\flashplayer10_3r183_11_win.exe /install" />

		<!-- Remove mistakenly installed Flash Player 10 IE / ActiveX version -->
		<upgrade
			cmd='%COMSPEC% /C if exist "%SYSTEMROOT%\system32\Macromed\Flash\uninstall_activeX.exe" "%SYSTEMROOT%\system32\Macromed\Flash\uninstall_activeX.exe" /S' />

		<remove
			cmd='%COMSPEC% /C if exist "%SYSTEMROOT%\system32\Macromed\Flash\FlashUtil10y_Plugin.exe" "%SYSTEMROOT%\system32\Macromed\Flash\FlashUtil10y_Plugin.exe" /uninstall'/>
	</package>
	



	<package
		id="gnupg"
		name="GnuPG"
		revision="4"
		reboot="false"
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\GNU\GnuPG\gpg.exe" />

		<install
			cmd="%SOFTWARE%\gnupg\gnupg-w32cli-1.4.9.exe /S" />

		<upgrade
			cmd="%SOFTWARE%\gnupg\gnupg-w32cli-1.4.9.exe /S" />

			<remove
			cmd="%PROGRAMFILES%\GNU\GnuPG\uninst-gnupg.exe /S" />
	</package>

	





	<package
		id="gimp"
		name="The GIMP"
		revision="17"
		reboot="false"
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\GIMP\bin\gimp-2.6.exe" />

		<install
			cmd='%SOFTWARE%\gimp\gimp-2.6.10-i686-setup-1.exe SP- /SILENT /NORESTART /DIR="%PROGRAMFILES%\gimp"' />

		<upgrade
			cmd='%SOFTWARE%\gimp\gimp-2.6.10-i686-setup-1.exe SP- /SILENT /NORESTART /DIR="%PROGRAMFILES%\gimp"' />

		<remove
			cmd='"%PROGRAMFILES%\gimp\setup\unins000.exe" /sp- /silent /nocancel /norestart /log' />
	</package>





	<package
		id="gimp-help"
		name="The GIMP help files (English)"
		revision="7"
		reboot="false"
		priority="3">

		<depends
			package-id="gimp" />

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\GIMP\share\gimp\2.0\help\en\index.html" />

		<install
			cmd="%SOFTWARE%\gimp-help\gimp-help-2-2.6.0-en-setup.exe SP- /SILENT /NORESTART" />

		<upgrade
			cmd="%SOFTWARE%\gimp-help\gimp-help-2-2.6.0-en-setup.exe SP- /SILENT /NORESTART" />
			
		<remove
			cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\GIMP\share\gimp\2.0\help\" '/>
</package>





	<package 
		id="infrarecorder" 
		name="InfraRecorder" 
		revision="6" 
		reboot="false" 
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\InfraRecorder\InfraRecorder.exe" />
			
		<install
			cmd="%SOFTWARE%\infrarecorder\ir050.exe /S" />

		<upgrade
			cmd="%SOFTWARE%\infrarecorder\ir050.exe /S" />

		<remove
			cmd="%PROGRAMFILES%\InfraRecorder\uninstall.exe /S" />
	</package>





	<package 
		id="inkscape" 
		name="Inkscape" 
		revision="6"
		reboot="false" 
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Inkscape\inkscape.exe" />
			
		<install
			cmd="%SOFTWARE%\inkscape\Inkscape-0.47-3.exe /S" />

		<!-- Inkscape upgrade first removes the prior version, leaving in uninst.exe; the new version's install then complains it won't install into a non-empty directory -->
		<upgrade
			cmd='cmd /c "IF EXIST "%PROGRAMFILES%\Inkscape\inkscape.exe" "%PROGRAMFILES%\Inkscape\Uninstall.exe"" /S' />

		<upgrade
			cmd='cmd /c "IF EXIST "%PROGRAMFILES%\Inkscape\nul.ext" rmdir "%PROGRAMFILES%\Inkscape" /s /q"' />

		<upgrade
			cmd="%SOFTWARE%\inkscape\Inkscape-0.47-3.exe /S" >
			<exit
				code="2" />
		</upgrade>

		<remove
			cmd="%PROGRAMFILES%\Inkscape\Uninstall.exe /S" />
	</package>










	<package
		id="irfanview"
		name="IrfanView"
		revision="5"
		reboot="false"
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\IrfanView\i_view32.exe" />

		<install
			cmd="%SOFTWARE%\irfanview\iview425_setup.exe /silent /desktop=1 /thumbs=0 /group=1 /allusers=1 /assoc=1" />

		<upgrade
			cmd="%SOFTWARE%\irfanview\iview425_setup.exe /silent /desktop=1 /thumbs=0 /group=1 /allusers=1 /assoc=1" />
			
		<remove
			cmd="%PROGRAMFILES%\IrfanView\iv_uninstall.exe /silent" />
	</package>





	
	<package
		id="irfanview-plugins"
		name="IrfanView plugins"
		revision="4"
		reboot="false"
		priority="3">

		<depends
			package-id="irfanview" />

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\IrfanView\Plugins\JPEG2000.dll" />

		<install
			cmd="%SOFTWARE%\irfanview-plugins\irfanview_plugins_425_setup.exe /silent" />

		<upgrade
			cmd="%SOFTWARE%\irfanview-plugins\irfanview_plugins_425_setup.exe /silent" />

		<remove
			cmd="%PROGRAMFILES%\IrfanView\iv_uninstall.exe /silent" />
	</package>





<package
		id="kompozer"
		name="KompoZer"
		revision="3"
		priority="3"
		reboot="false">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\KompoZer\kompozer.exe" />

		
		<install
			cmd='cmd /c "mkdir "%PROGRAMFILES%\KompoZer""' />
		
		<install
			cmd='cmd /c "xcopy /e /y /q %SOFTWARE%\kompozer\0710 "%PROGRAMFILES%\KompoZer""' />
				
		<upgrade
			cmd='cmd /c "rd /S /Q "%PROGRAMFILES%\KompoZer""' />
		
		<upgrade
			cmd='cmd /c "mkdir "%PROGRAMFILES%\KompoZer""' />
			
		<upgrade
			cmd='cmd /c "xcopy /e /y /q %SOFTWARE%\kompozer\0710 "%PROGRAMFILES%\KompoZer""' />

		<remove
		cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\KompoZer"' />
</package> 





<package
		id="k-lite-codec-pack"
		name="K-Lite codec pack"
		revision="10"
		priority="3"
		reboot="false">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\K-Lite Codec Pack\unins000.exe" />
		
		<install
			cmd='%SOFTWARE%\k-lite-codec-pack\K-Lite_Codec_Pack_700_Standard.exe /verysilent /norestart /LoadInf=".\k-lite-settings.ini"' />

		<upgrade
			cmd='%SOFTWARE%\k-lite-codec-pack\K-Lite_Codec_Pack_700_Standard.exe /verysilent /norestart /LoadInf=".\k-lite-settings.ini"' />

		<remove
			cmd='"%PROGRAMFILES%\K-Lite Codec Pack\unins000.exe" /SILENT' />
	</package> 







 <package
		id="lightning"
		name="Lightning (Thunderbird extension)"
		revision="10"
		reboot="false"
		priority="3">

		<depends
			package-id="thunderbird" />

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Thunderbird\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}\install.rdf" />


 
    <install 
		cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\lightning\{e2fda1a4-762b-4020-b5ad-a41df1933103}" "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}"' />
 
    <upgrade
		cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\lightning\{e2fda1a4-762b-4020-b5ad-a41df1933103}" "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}"' />
 
    <remove
		cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}"' />
</package>






	
	<package
		id="mail-redirect"
		name="Mail Redirect (Thunderbird extension)"
		revision="6"
		reboot="false"
		priority="3">

		<depends
			package-id="thunderbird" />

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Thunderbird\extensions\{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}\chrome\mailredirect.jar" />

		<install
			cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\mail-redirect\{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}" "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}"' />

		<upgrade
			cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\mail-redirect\{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}" "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}"' />
		
		<remove
			cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{CC3C233D-6668-41bc-AAEB-F3A1D1D594F5}"' />
	</package>





	<package
		id="wmp-firefox-plugin"
		name="Windows Media Player plugin (Firefox)"
		revision="2"
		reboot="false"
		priority="3">

		<depends
			package-id="firefox" />

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Firefox\plugins\WMP Firefox Plugin RelNotes.txt" />

		<install
			cmd='msiexec /package "%SOFTWARE%\wmp-firefox-plugin\ffplugin.msi" /passive' />

		<upgrade
			cmd='msiexec /package "%SOFTWARE%\wmp-firefox-plugin\ffplugin.msi" /passive' />

		<remove
			cmd='MsiExec /qb /uninstall {69FDFBB6-351D-4B8C-89D8-867DC9D0A2A4}' />
	</package>




	
	<package
		id="myodbc"
		name="MyODBC connector"
		revision="5"
		reboot="false"
		priority="3" >

		<check
			type="uninstall"
			condition="exists"
			path="MySQL Connector/ODBC 3.51" />

		<!-- We downgraded from version 5.1 to 3.51 so need to uninstall version 5 else they co-exist -->
		<install
			cmd="MsiExec.exe /qb /uninstall {29042B1C-0713-4575-B7CA-5C8E7B0899D4}" >
			<exit code='1605' />
		</install>

		<install
			cmd='msiexec /qb /package "%SOFTWARE%\myodbc\mysql-connector-odbc-3.51.26-win32.msi" /qr' />

		<upgrade
			cmd="MsiExec.exe /qb /uninstall {29042B1C-0713-4575-B7CA-5C8E7B0899D4}" >
			<exit code='1605' />
		</upgrade>

		<upgrade
			cmd='msiexec /qb /package "%SOFTWARE%\myodbc\mysql-connector-odbc-3.51.26-win32.msi" /qr' />

		<remove
			cmd="MsiExec.exe /qb /uninstall {B53D7D6B-9BB0-4EA8-82B9-9293CB41FCE1}" />
	</package>



	<package
		id="notepad++"
		name="Notepad++"
		revision="15"
		reboot="false"
		priority="3">

		<check
			type="uninstall"
			condition="exists"
			path="Notepad++" />

		<install
			cmd="%SOFTWARE%\notepad++\npp.5.6.6.Installer.exe /S" />

		<!-- Disable auto updater by renaming the 'update' directory that contains GUP -->
		<install
			cmd='cmd /C if exist "%PROGRAMFILES%\Notepad++\updater" move /Y "%PROGRAMFILES%\Notepad++\updater" "%PROGRAMFILES%\Notepad++\disabled-updater"' />

		<upgrade
			cmd="%SOFTWARE%\notepad++\npp.5.6.6.Installer.exe /S" />

		<!-- Disable auto updater by renaming the 'update' directory that contains GUP -->
		<upgrade
			cmd='cmd /C if exist "%PROGRAMFILES%\Notepad++\updater" move /Y "%PROGRAMFILES%\Notepad++\updater" "%PROGRAMFILES%\Notepad++\disabled-updater"' />

		<remove
			cmd="%PROGRAMFILES%\Notepad++\uninstall.exe /S" />
</package>



<package
                id="odf-converter-integrator"
                name="odf Converter Integrator"
                revision="1"
                reboot="false"
                priority="3">

                <depends
                        package-id="openoffice" />

                <check
                        type="uninstall"
                        condition="exists"
                        path="odf-converter-integrator" />

                        
                <install
                 
						cmd='"%SOFTWARE%\odf-converter-integrator\odf-converter-integrator-0.2.1-installer.exe" /S' />


                <remove
                        cmd="%PROGRAMFILES%\odf-converter-integrator\uninstall.exe" />
        </package>
	






<package 
		id="oggcodecs" 
		name="Ogg Codec"
		revision="1" 
		reboot="false" 
		priority="2">
		
	<check 
			type="uninstall" 
			condition="exists" 
			path="oggcodecs 0.71.0946" />
        
	<install 
		cmd='"%SOFTWARE%\ogg-codecs\oggcodecs_0.71.0946.exe" /S' />
        
	<upgrade 
		cmd='"%SOFTWARE%\ogg-codecs\oggcodecs_0.71.0946.exe" /S' />
        
	<remove 
		cmd='"%PROGRAMFILES%\illiminable\oggcodecs\uninst.exe" /silent' />
		
</package>







<package
		id="go-oo" 
		name="Go-oo / OpenOffice" 
		revision="7"
		reboot="false" 
		priority="3">

		<depends
			package-id="sun-jre" />

		<check 
			type="uninstall" 
			condition="exists" 
			path="OpenOffice.org 3.2" />

		<install
			cmd='msiexec /qb /package "%SOFTWARE%\go-oo\openofficeorg32.msi" REGISTER_ALL_MSO_TYPES=1' />
		
		<!-- uninstall OpenOffice 3.0 / 3.0.1 -->
		<upgrade
			cmd="msiexec /qb /uninstall {92B79901-C57D-409F-8D2F-4E5337383569}">
			<exit code='0' />
			<exit code='1605' />
		</upgrade>

		<!-- uninstall OpenOffice 3.1.0 / 3.1.1 -->
		<upgrade
			cmd="msiexec /qb /uninstall {A16B3EA2-8798-4960-8D8B-18D3149AD617}">
			<exit code='0' />
			<exit code='1605' />
		</upgrade>
		
		<!-- remove openoffice directory - OpenOffice uninstaller doesn't remove all its programfiles files -->
		<upgrade
			cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\OpenOffice" rmdir /S /Q "%PROGRAMFILES%\OpenOffice"' />

		<!-- if you don't first uninstall the previous version it says "the same version of this product is already installed" -->
		<!-- If you try to uninstall a previous version that isn't actually installed you get an error 1605 which WPKG fails on  -->
		<!-- Uninstall Go-oo 3.2.0-10 -->
		<upgrade
			cmd="msiexec /qb /uninstall {AFB21BFE-40E6-42FB-A010-B80F417D8E71}" >
			<exit code='0' />
			<exit code='1605' />
		</upgrade>

		<!-- Uninstall Go-oo 3.2.0-12 -->
		<upgrade
			cmd="msiexec /qb /uninstall {CC5CC633-D711-48A4-A812-9ED64BC47009}" >
			<exit code='0' />
			<exit code='1605' />
		</upgrade>

		<!-- Uninstall Go-oo 3.2.0-13 -->
		<upgrade
			cmd="msiexec /qb /uninstall {60CE6B15-E8DC-4096-83FA-5D8DE8B9ED5B}" >
			<exit code='0' />
			<exit code='1605' />
		</upgrade>

		<!-- 3.2.1-11 -->
		<upgrade
			cmd='msiexec /qb /package "%SOFTWARE%\go-oo\openofficeorg32.msi" ALLUSERS=1 REGISTER_ALL_MSO_TYPES=1' />

		<!-- 3.2.1-11 -->
		<remove
			cmd="msiexec /qb /uninstall {D796471F-CF8B-41B5-AD8F-C574BB5B1C84}" />
	</package>

	
	
	
	
	
<package
		id="go-oo-lang-pack" 
		name="Go-oo / OpenOffice Language Pack" 
		revision="7"
		reboot="false" 
		priority="3">

		<depends
			package-id="go-oo" />

		<check 
			type="file" 
			condition="exists" 
			path="%PROGRAMFILES%\OpenOffice.org 3\licenses\license_en-GB.txt" />
			<!-- Using a .res file for the check failed and we never knew why -->

		<install
			cmd='msiexec /qb /package "%SOFTWARE%\go-oo-lang-pack\openofficeorg32.msi"' />

		<!-- if you don't first uninstall the previous version it says "the same version of this product is already installed" -->
		<!-- If you try to uninstall a previous version that isn't actually installed you get an error 1605 which WPKG fails on  -->
		<!-- Uninstall Go-oo lang pack 3.2.0-10 -->
		<upgrade
			cmd="msiexec /qb /uninstall {68AE25FB-90BC-486D-9F48-8EFED07D42B1}" >
			<exit code='0' />
			<exit code='1605' />
		</upgrade>
		
		<!-- Uninstall Go-oo lang pack 3.2.0-12 -->
		<upgrade
			cmd="msiexec /qb /uninstall {B0111E47-DC7C-4350-B115-D506D2CC909F}" >
			<exit code='0' />
			<exit code='1605' />
		</upgrade>

		<!-- Uninstall Go-oo lang pack 3.2.0-13 -->
		<upgrade
			cmd="msiexec /qb /uninstall {DCD149DE-0FBA-49D0-A482-062579B8B9B5}" >
			<exit code='0' />
			<exit code='1605' />
		</upgrade>

		<upgrade
			cmd='msiexec /qb /package "%SOFTWARE%\go-oo-lang-pack\openofficeorg32.msi"' />

		<remove
			cmd="msiexec /qb /uninstall {3AA505B2-27EC-41EE-9C87-17E868ABCE7F}" />
</package>
















	<package
		id="openoffice" 
		name="OpenOffice" 
		revision="11"
		reboot="false" 
		priority="3">

		<depends
			package-id="sun-jre" />

		<check 
			type="uninstall" 
			condition="exists" 
			path="OpenOffice.org 3.1" />

		<!-- We uninstall the previous version of OpenOffice, whether it's a x.1.0 or an x.y.1, because the installer (on upgrade or install) wants to uninstall the previous version, which with WPKG unattended fails with exit code 1638. 3.0 / 3.0.1 is 92B79901-C57D-409F-8D2F-4E5337383569; 3.1 / 3.1.1 is A16B3EA2-8798-4960-8D8B-18D3149AD617. We include removal of both in case a previous version is installed -->

		<!-- uninstall OpenOffice 3.0 / 3.0.1 -->
		<install
			cmd="msiexec /qb /uninstall {92B79901-C57D-409F-8D2F-4E5337383569}">
			<exit code='0' />
			<exit code='1605' />
			</install>

		<!-- uninstall OpenOffice 3.1.0 / 3.1.1 -->
		<install
			cmd="msiexec /qb /uninstall {A16B3EA2-8798-4960-8D8B-18D3149AD617}">
			<exit code='0' />
			<exit code='1605' />
		</install>
			
		<install
			cmd='msiexec /qb /package "%SOFTWARE%\openoffice\openofficeorg31.msi" TRANSFORMS=%SOFTWARE%\openoffice\openoffice-installer-customisation.mst ALLUSERS=1 REGISTER_ALL_MSO_TYPES=1' />

		<!-- uninstall OpenOffice 3.0 / 3.0.1 -->
		<upgrade
			cmd="msiexec /qb /uninstall {92B79901-C57D-409F-8D2F-4E5337383569}">
			<exit code='0' />
			<exit code='1605' />
		</upgrade>

		<!-- uninstall OpenOffice 3.1.0 / 3.1.1 -->
		<upgrade
			cmd="msiexec /qb /uninstall {A16B3EA2-8798-4960-8D8B-18D3149AD617}">
			<exit code='0' />
			<exit code='1605' />
		</upgrade>

		<upgrade
			cmd='msiexec /qb /package "%SOFTWARE%\openoffice\openofficeorg31.msi" TRANSFORMS=%SOFTWARE%\openoffice\openoffice-installer-customisation.mst ALLUSERS=1 REGISTER_ALL_MSO_TYPES=1' />

		<remove
			cmd="msiexec /qb /uninstall {A16B3EA2-8798-4960-8D8B-18D3149AD617}" />
	</package>



	
<package 
	id="picasa" 
	name="Picasa" 	
	revision="14" 
	priority="3" 
	reboot="false" >

	<check type='uninstall' condition='exists' path='Picasa 3' />

	<install cmd='"%SOFTWARE%\picasa\picasa36-setup.exe" /S' />

	<!--<upgrade cmd='cmd /C taskkill /F /IM Picasa3.exe' >
    <exit code='1' />
    <exit code='128' /></upgrade>-->

  <upgrade cmd='"%SOFTWARE%\picasa\picasa36-setup.exe" /S' />

   <!--<upgrade cmd='cmd /C taskkill /F /IM Picasa3.exe' >
    <exit code='1' />
    <exit code='128' /></upgrade>-->
  

	<remove cmd='"%PROGRAMFILES%\Google\picasa3\Uninstall.exe" /S' />
  </package>








<package
		id="pidgin"
		name="pidgin"
		revision="11"
		reboot="false"
		priority="3" >
			
		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\pidgin\pidgin.exe" />

		<install
			cmd="%SOFTWARE%\pidgin\pidgin-2.6.6.exe /S" />

		<upgrade
			cmd="%SOFTWARE%\pidgin\pidgin-2.6.6.exe /S" />

		<remove
			cmd='"%PROGRAMFILES%\pidgin\pidgin-uninst.exe" /S' />
	</package>








	<package
		id="pidgin-otr"
		name="Pidgin OTR plugin"
		revision="2"
		reboot="false"
		priority="3" >
		<depends
			package-id="pidgin" />

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\pidgin-otr\pidgin-otr-uninst.exe" />

		<install
			cmd="%SOFTWARE%\pidgin-otr\pidgin-otr-3.2.0-1.exe /S" />

		<remove
			cmd="%PROGRAMFILES%\pidgin-otr\pidgin-otr-uninst.exe /S" />

		<!-- Note that the upgrade isn't silent -->
		<upgrade
			cmd="%SOFTWARE%\pidgin-otr\pidgin-otr-3.2.0-1.exe /S" />
	</package>






	<package
		id="putty"
		name="Putty"
		revision="2"
		priority="3"
		reboot="false">

		<check
			type="uninstall"
			condition="exists"
			path="PuTTY version 0.60" />

		<install
			cmd="%SOFTWARE%\putty\putty-0.60-installer.exe /sp- /silent /nocancel /norestart /log" />

		<upgrade
			cmd="%SOFTWARE%\putty\putty-0.60-installer.exe /sp- /silent /nocancel /norestart /log" />

		<remove
			cmd="%PROGRAMFILES%\PuTTY\unins000.exe /silent /log /norestart" />
	</package>




	<package 
		id="nero-burnrights" 
		name="Nero BurnRights" 
		revision="1" 
		reboot="false" 
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Ahead\NeroBurnRights\NeroBurnRights.exe" />

		<install
			cmd='%SOFTWARE%\nero-burnrights\NeroBurnRightsInstaller.exe /silent /burnrights:all' />

		<upgrade
			cmd='%SOFTWARE%\nero-burnrights\NeroBurnRightsInstaller.exe /silent /burnrights:all' />

		<remove
			cmd="%WINDIR%\UNNeroBurnRights.exe /uninstall /silent" />
			
	</package>




<package
	id="qt-lite"
	name="QT Lite"
	revision="4"
	reboot="false"
	priority="3">

	<check
		type="uninstall"
		condition="exists"
		path="QT Lite 4.1.0" />

	<install cmd='"%SOFTWARE%\qt-lite\QT_Lite_410.exe" /verysilent /noreboot' />

	<upgrade cmd='"%PROGRAMFILES%\QT Lite\unins000.exe" /SILENT' />

	<upgrade cmd='"%SOFTWARE%\qt-lite\QT_Lite_410.exe" /verysilent /noreboot' />

	<remove cmd='"%PROGRAMFILES%\QT Lite\unins000.exe" /SILENT' />
</package>





<package
	id="real-alternative-lite" 
	name="Real Alternative Lite"
	revision="3"
	reboot="false"
	priority="3">

	<check
		type="uninstall"
		condition="exists"
		path="Real Alternative 2.0.1 Lite" />

	<install cmd='"%SOFTWARE%\real-alternative-lite\Real_Alternative_201_Lite.exe" /verysilent /noreboot' />

	<upgrade cmd='"%SOFTWARE%\real-alternative-lite\Real_Alternative_201_Lite.exe" /verysilent /noreboot' />

	<remove cmd='"%PROGRAMFILES%\Real Alternative\unins000.exe" /verysilent /noreboot' />
</package>





<package
		id="recuva"
		name="Recuva"
		revision="1"
		priority="3">
		
		<check 
			type="uninstall" 
			condition="exists" 
			path="Recuva" />
		
		<install 
			cmd='"%SOFTWARE%\recuva\rcsetup133.exe" /S' />
				
		<upgrade 
			cmd='"%SOFTWARE%\recuva\rcsetup133.exe" /S' />
		
		<remove cmd='%PROGRAMFILES%\recuva\uninst.exe /S' />
		
	</package>





	
<package
	id="scribus"
	name="Scribus"
	revision="8"
	reboot="false"
	priority="3">

	<check
		type="file"
		condition="exists"
		path="%PROGRAMFILES%\Scribus\Scribus.exe" />

	<install
		cmd="%SOFTWARE%\scribus\scribus-1.3.6-win32-install.exe /S /D=%PROGRAMFILES%\Scribus" />
		
	<upgrade
		cmd="%SOFTWARE%\scribus\scribus-1.3.6-win32-install.exe /S /D=%PROGRAMFILES%\Scribus" />

	<remove
		cmd='"%PROGRAMFILES%\Scribus\uninst.exe" /S' />

</package>
	



 




<package id="sun-jre"
   name="Sun Java Runtime Environment"
   revision="24"
   reboot="false"
   priority="4">

<check
           type="file"
           condition="exists"
           path="%PROGRAMFILES%\Java\jre6\bin\javacpl.exe" />

<install
   cmd='net STOP JavaQuickStarterService' >
		<!-- Errorlevel 2 means it was already stopped -->
		<exit code='2' />
</install>

<!-- Uninstall 6.0 (update 0) -->
<install
   cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160000}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 1 -->
<install
   cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160010}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 2 -->
<install
   cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160020}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 3 -->
<install
   cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160030}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 4 -->
<install
   cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160040}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 5 -->
<install
   cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160050}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 6 -->
<install
   cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160060}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 7 -->
<install
   cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160070}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 10 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216010FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 11 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216011FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 12 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216012FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 13 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216013FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 14 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216014FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 15 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216015FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 16 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216016FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 17 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216017FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 18 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216018FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 19 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216019FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 20 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216020FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 21 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216021FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 22 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216022FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 23 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216023FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 24 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216024FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 25 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216025FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 26 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216026FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Uninstall 6.0 update 27 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216027FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- There was no 6.0 update 28 -->

<!-- Uninstall 6.0 update 29 -->
<install cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216029FF}'>
<exit code='0' />
<exit code='1605' />
</install>

<!-- Install 6.0 update 30 -->
<install
   cmd='%SOFTWARE%\sun-jre\jre-6u30-windows-i586.exe /s'>
</install>

<!-- Remove autoupdater -->
<!-- Since approximately 6.0u18 Java Auto Updater is included as a separate package that is automatically installed with the JRE. You can disable automatic updates by uninstalling the Java Auto Updater after the JRE is installed or upgraded. -->

<install
       cmd='msiexec /qn /x {4A03706F-666A-4037-7777-5F2748764D10}' />



<upgrade
   cmd='net STOP JavaQuickStarterService' >
<exit code='2' />
</upgrade>

<!-- Uninstall 6.0 (update 0) -->
<upgrade
   cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160000}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 1 -->
<upgrade
       cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160010}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 2 -->
<upgrade
       cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160020}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 3 -->
<upgrade
       cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160030}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 4 -->
<upgrade
       cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160040}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 5 -->
<upgrade
       cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160050}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 6 -->
<upgrade
       cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160060}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 7 -->
<upgrade
       cmd='msiexec /qn /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160070}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 10 -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216010FF}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 11 -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216011FF}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 12 -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216012FF}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 13 -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216013FF}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 14 -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216014FF}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 15 -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216015FF}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 16 -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216016FF}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 17 -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216017FF}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall 6.0 update 18 -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216018FF}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- Uninstall problem install of 6.0 update 24 -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216024FF}'>
<exit code='0' />
<exit code='1605' />
</upgrade>

<!-- The default patch-in-place mechanism (from JRE 6 Update 10 onwards) makes removing previous versions on upgrade unnecessary. -->

<!-- 11/8/11 FIX: Uninstall 6.0 update 26 because we're seeing it partially installed due to broken reinstalls when we've bumped the revision number -->
<upgrade cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216026FF}'>
	<exit code='0' />
	<exit code='1605' />
</upgrade>

<!-- Upgrade / install 6.0 update 30 -->
<upgrade
       cmd='%SOFTWARE%\sun-jre\jre-6u30-windows-i586.exe /s'>
</upgrade>

<!-- Remove autoupdater -->
<upgrade
       cmd='msiexec /qn /x {4A03706F-666A-4037-7777-5F2748764D10}' />



<!-- Uninstall 6.0 update 30 -->
<remove
       cmd='msiexec /qn /uninstall {26A24AE4-039D-4CA4-87B4-2F83216030FF}' />
</package>











 








	<package 
		id="thunderbird" 
		name="Mozilla Thunderbird" 
		revision="34"
		reboot="false" 
		priority="3">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Thunderbird\thunderbird.exe"/>

		<install
			cmd="%SOFTWARE%\Thunderbird\Thunderbird Setup 3.1.17.exe -ms" />

		<upgrade
			cmd="%SOFTWARE%\Thunderbird\Thunderbird Setup 3.1.17.exe -ms" />

		<remove
			cmd="%PROGRAMFILES%\Mozilla Thunderbird\uninstall\helper.exe /S" >
			<exit
				code="20" /></remove>
	</package>




	
	<package
		id="thunderbird-spellcheck-dictionary-en-gb"
		name="Thunderbird spellchecker dictionary English (GB)"
		revision="5"
		reboot="false"
		priority="3">

		<depends
			package-id="thunderbird" />

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Thunderbird\dictionaries\en-GB.dic" />

		<install
			cmd='cmd /c "IF NOT EXIST "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries" mkdir "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries""' />

		<install
			cmd='cmd /c "copy "%SOFTWARE%\thunderbird-dictionaries\*.*" "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries\""' />

		<upgrade
			cmd='cmd /c "IF NOT EXIST "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries" mkdir "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries""' />

		<upgrade
			cmd='cmd /c "copy "%SOFTWARE%\thunderbird-dictionaries\*.*" "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries\""' />

		<remove
			cmd='%COMSPEC% del "%PROGRAMFILES%\Mozilla Thunderbird\dictionaries\en-GB.dic" '>
			<exit code='1' />
		</remove>
	</package>







 	<package
		id="tweak-unattended-flash-player-system-config"
		name="TWEAK (Unattended) - Adobe Flash Player config"
		revision="3"
		reboot="false"
		priority="3">

	<check
			type="file"
			condition="exists"
			path="%WINDIR%\system32\Macromed\Flash\mms.cfg"/>

		<install
			cmd='cmd /c "\\server\windows-admin\tweak-unattended\flash-player-system-config.bat" '/>

		<upgrade
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\flash-player-system-config.bat" '/>
		<remove
			cmd='%COMSPEC% /c del "%SYSTEMDRIVE%\tweak-log\flash-player-system-config.log" '>
			<exit code='1' />
		</remove>


		<remove
			cmd='%COMSPEC% /c del "%WINDIR%\system32\Macromed\Flash\mms.cfg" '>
			<exit code='1' />
		</remove>
	</package>







 	<package
		id="tweak-unattended-windows-config-general"
		name="TWEAK (Unattended) - Windows Config - General"
		revision="5"
		reboot="false"
		priority="3">

	<check
			type="file"
			condition="exists"
			path="%SYSTEMDRIVE%\tweak-log\windows-config-general.log"/>

		<install
			cmd='cmd /c "\\server\windows-admin\tweak-unattended\windows-config-general.bat" '/>

		<upgrade
			cmd='cmd /c "\\server\windows-admin\tweak-unattended\windows-config-general.bat" '/>
	</package>






 	<package
		id="tweak-unattended-windows-config-domain"
		name="TWEAK (Unattended) - Windows Config - Domain"
		revision="3"
		reboot="false"
		priority="3">

	<check
			type="file"
			condition="exists"
			path="%SYSTEMDRIVE%\tweak-log\windows-config-domain.log"/>

		<install
			cmd='cmd /c "\\server\windows-admin\tweak-unattended\windows-config-domain.bat"'/>

		<upgrade
			cmd='cmd /c "\\server\windows-admin\tweak-unattended\windows-config-domain.bat"'/>
	</package>






 	<package
		id="tweak-unattended-mse-whitelist-ultravnc"
		name="TWEAK (Unattended) - Add MSE whitelisting of UltraVNC"
		revision="2"
		reboot="false"
		priority="3">

	<check
			type="file"
			condition="exists"
			path="%SYSTEMDRIVE%\tweak-log\mse-whitelist-ultravnc.log"/>

	<install
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\mse-whitelist-ultravnc.bat" '/>

	<upgrade
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\mse-whitelist-ultravnc.bat" '/>

	<remove
			cmd='%COMSPEC% /c reg del "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Antimalware\Exclusions\Paths$C:\Program Files\UltraVNC\winvnc.exe" '/>

	<remove
			cmd='%COMSPEC% /c del "%SYSTEMDRIVE%\tweak-log\mse-whitelist-ultravnc.log" '/>
	</package>





 	<package
		id="tweak-unattended-remove-per-machine-shortcuts"
		name="TWEAK (Unattended) - Shortcut Management - Remove Per-machine Shortcuts"
		revision="11"
		reboot="false"
		priority="1">

	<check
			type="file"
			condition="exists"
			path="%SYSTEMDRIVE%\tweak-log\remove-per-machine-shortcuts.log"/>

		<install
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\remove-per-machine-shortcuts.bat"'/>

		<upgrade
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\remove-per-machine-shortcuts.bat"'/>
	</package>






<package
		id="tweak-unattended-thunderbird-system-config"
		name="TWEAK (Unattended) - Thunderbird system config - general config"
		revision="3"
		reboot="false"
		priority="3">

		<depends
			package-id="thunderbird" />

	<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Thunderbird\defaults\pref\all-thunderbird-custom.js"/>
		
		<install
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\thunderbird-system-config.bat" '/>

		<upgrade
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\thunderbird-system-config.bat" '/>

		<remove
			cmd='%COMSPEC% /c del "%PROGRAMFILES%\Mozilla Thunderbird\defaults\pref\all-thunderbird-custom.js" '>
			<exit code='1' />
		</remove>


		<remove
			cmd='%COMSPEC% /C del "%SYSTEMDRIVE%\tweak-log\thunderbird-system-config.log" '>
			<exit code='1' />
		</remove>
	</package>


	
	
	
	

<package
		id="tweak-unattended-thunderbird-system-config-disable-updates"
		name="TWEAK (Unattended) - Thunderbird system config - disable updates"
		revision="2"
		reboot="false"
		priority="3">

		<depends
			package-id="thunderbird" />

	<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Thunderbird\defaults\pref\all-thunderbird-custom-disable-updates.js"/>
		
		<install
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\thunderbird-system-config-disable-updates.bat" '/>

		<upgrade
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\thunderbird-system-config-disable-updates.bat" '/>

		<remove
			cmd='%COMSPEC% /c del "%PROGRAMFILES%\Mozilla Thunderbird\defaults\pref\all-thunderbird-custom-disable-updates.js" '>
			<exit code='1' />
		</remove>


		<remove
			cmd='%COMSPEC% /c del "%SYSTEMDRIVE%\tweak-log\thunderbird-system-config-disable-updates.log" '>
			<exit code='1' />
		</remove>

	</package>






<package
		id="tweak-unattended-thunderbird-system-config-disable-sync"
		name="TWEAK (Unattended) - Thunderbird system config - disable auto-sync and offline working"
		revision="2"
		reboot="false"
		priority="3">

		<depends
			package-id="thunderbird" />

	<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Thunderbird\defaults\pref\all-thunderbird-custom-disable-sync.js"/>
		
		<install
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\thunderbird-system-config-disable-sync.bat" '/>

		<upgrade
			cmd='%COMSPEC% /c "\\server\windows-admin\tweak-unattended\thunderbird-system-config-disable-sync.bat" '/>

		<remove
			cmd='%COMSPEC% /c del "%PROGRAMFILES%\Mozilla Thunderbird\defaults\pref\all-thunderbird-custom-disable-sync.js" '>
			<exit code='1' />
		</remove>


		<remove
			cmd='cmd /c del "%SYSTEMDRIVE%\tweak-log\thunderbird-system-config-disable-sync.log" '>
			<exit code='1' />
		</remove>
</package>






<package
		id="tweak-unattended-zotero-system-config"
		name="TWEAK (Unattended) - Zotero system config"
		revision="9"
		reboot="false"
		priority="2">

	<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Firefox\extensions\zotero@chnm.gmu.edu\defaults\preferences\zotero-custom-data-directory-h.js"/>
		
	<install
			cmd='%COMSPEC% /C "\\server\windows-admin\tweak-unattended\zotero-system-config.bat" '/>

	<upgrade
			cmd='%COMSPEC% /C "\\server\windows-admin\tweak-unattended\zotero-system-config.bat" '/>
		
	<remove
			cmd='%COMSPEC% /C "del "%PROGRAMFILES%\Mozilla Firefox\extensions\zotero@chnm.gmu.edu\defaults\preferences\zotero-custom.js"" '>
			<exit code='1' />
	</remove>

	<remove
			cmd='%COMSPEC% /C "del "%SYSTEMDRIVE%\tweak-log\zotero-system-config.log"" '>
			<exit code='1' />
	</remove>
</package>







<package
		id="ultravnc"
		name="Ultra VNC"
		revision="4"
		reboot="false"
		priority="3"> 

		<check
			type="uninstall"
			condition="exists"
			path="UltraVNC v1.0.2" />

		<install
			cmd='%SOFTWARE%\ultravnc\UltraVNC-102-Setup.exe  /silent /loadinf="\\server\windows-admin\wpkg\packages\ultravnc\ultravnc-installer-settings.inf"' />

		<upgrade
			cmd='%SOFTWARE%\ultravnc\UltraVNC-102-Setup.exe  /silent /loadinf="\\server\windows-admin\wpkg\packages\ultravnc\ultravnc-installer-settings.inf"' />
		

		<remove
			cmd="%PROGRAMFILES%\UltraVNC\unins000.exe /silent" />
	</package>

	
	
	

<package
		id="windows-remote-desktop-connection-client"
		name="Windows Remote Desktop Connection client 7.0"
		revision="1"
		reboot="false"
		priority="3">

		<check
			type="registry"
			condition="exists"
			path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix\KB969084" />

		<install
				cmd='%SOFTWARE%\windows-remote-desktop-connection-client\WindowsXP-KB969084-x86-enu.exe /passive /norestart'/>

		<upgrade
				cmd='%SOFTWARE%\windows-remote-desktop-connection-client\WindowsXP-KB969084-x86-enu.exe /passive /norestart'/>
</package>








	<package
		id="winscp"
		name="WinSCP"
		revision="8"
		priority="3"
		reboot="false">

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\WinSCP\WinSCP.exe" />

		<install
			cmd="%SOFTWARE%\winscp\winscp419setup.exe /sp- /silent /nocancel /norestart /log" />

		<upgrade
			cmd="%SOFTWARE%\winscp\winscp419setup.exe /sp- /silent /nocancel /norestart /log" />

		<remove
			cmd="%PROGRAMFILES%\WinSCP\unins000.exe /silent /log /norestart" />
	</package>

	
	
	
	
	
	

 
	<package
	   id="wpkg-client"
	   name="WPKG Client 1.3.9"
	   revision="1"
	   reboot="false"
		priority="0">

	<check
		type="uninstall" condition="exists" path="WPKG" />

	<check
		type="file" condition="versionequalto" path="%PROGRAMFILES%\wpkg\wpkginst.exe" value="1.0.0.18" />

	<install
		cmd='msiexec /norestart /qn /i "%SOFTWARE%\wpkg-client\WPKG Client 1.3.9-x32.msi" '/>
 
	<upgrade
		cmd='msiexec /norestart /qn /i "%SOFTWARE%\wpkg-client\WPKG Client 1.3.9-x32.msi" '/>
	</package>












<package
		id="zotero"
		name="Zotero (Firefox extension)"
		revision="8"
		reboot="false"
		priority="3">

	<depends
		package-id="firefox" />

	<depends
		package-id="sun-jre" />

	<check
		type="file"
		condition="exists"
		path="%PROGRAMFILES%\Mozilla Firefox\extensions\zotero@chnm.gmu.edu\install.rdf" />

	<upgrade
		cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\zotero\zotero@chnm.gmu.edu" "%PROGRAMFILES%\Mozilla Firefox\extensions\zotero@chnm.gmu.edu"' />
 
	<install
		cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\zotero\zotero@chnm.gmu.edu" "%PROGRAMFILES%\Mozilla Firefox\extensions\zotero@chnm.gmu.edu"' />

	<remove
		cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\Mozilla Firefox\extensions\zotero@chnm.gmu.edu"' />
	</package>

	
	
	
	
	
	
	
<package
		id="zotero-openoffice-plugin"
		name="Zotero plugin (Openoffice extension)"
		revision="5"
		reboot="false"
		priority="3">

		<depends
			package-id="go-oo" />

		<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\Mozilla Firefox\extensions\zoteroOpenOfficeIntegration@zotero.org\license.txt" />

		<upgrade
		cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\zotero-openoffice-plugin\zoteroOpenOfficeIntegration@zotero.org" "%PROGRAMFILES%\Mozilla Firefox\extensions\zoteroOpenOfficeIntegration@zotero.org"' />
 
    <install
		cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\zotero-openoffice-plugin\zoteroOpenOfficeIntegration@zotero.org" "%PROGRAMFILES%\Mozilla Firefox\extensions\zoteroOpenOfficeIntegration@zotero.org"' />

    <remove
		cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\Mozilla Firefox\extensions\zoteroOpenOfficeIntegration@zotero.org"' />

	</package>





 	<package
		id="zotero-pdf-indexing"
		name="Zotero PDF indexing binaries"
		revision="3"
		reboot="false"
		priority="3">

	<check
			type="file"
			condition="exists"
			path="%PROGRAMFILES%\zotero-pdf-indexing\pdftotext-Win32.exe" />

		<install
			cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\zotero-pdf-indexing" "%PROGRAMFILES%\zotero-pdf-indexing" '/>

		<upgrade
			cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\zotero-pdf-indexing" "%PROGRAMFILES%\zotero-pdf-indexing" '/>

		<remove
			cmd='cmd /c rd /s /q "%PROGRAMFILES%\zotero-pdf-indexing" '/>
	</package>


</packages>

