23
edits
Changes
no edit summary
<package
<variable name="version" value="0.10.5.0" />
<package
<depends package-id="chocolatey" /> <!-- See https://chocolatey.org/packages . Can use more than one: <variable name="PKGNAMES" value="vlc firefox nssm notepadplusplus git 7zip" /> --> <variable name="PKGNAMES" value="classic-shell googlechrome notepadplusplus" />
<variable name="!-- check for a version" of each package --> <check path='Classic Shell' value="2'4.23.6" 0' type='uninstall' condition='versiongreaterorequal' /> <variable namecheck path='Google Chrome' value='61.0.3163.100' type='uninstall' condition='versiongreaterorequal' /> <check path='Notepad\+\+.*' value='7.5.1' type='uninstall' condition='versiongreaterorequal' /> <!-- Or could possibly use choco list in a .cmd file like this, though harder to catch versiongreaterorequal: choco list - -localonly | findstr /ib /c:%1 exit %ERRORLEVEL% <check type="PKGNAMEexecute" path='chocotest.cmd "7zip "' condition="exitcodeequalto" value="vlc0" /> -->
<check type='uninstall' condition='versiongreaterorequal' path='VLC media player' value='%version%' /!-- "choco upgrade" command installs or upgrades as appropriate. --> <install cmd='%COMSPEC% /v /c set ChocolateyInstall=%programdata%\chocolatey&& %programdata%\chocolatey\choco install upgrade %PKGNAMEPKGNAMES% -y>"%programdata%\chocolatey\logs\wpkgchocoinstall.log"' /> <upgrade cmdinclude='%COMSPEC% /c choco upgrade %PKGNAME% -y' "install" /> <remove cmd='%COMSPEC% /v /c set ChocolateyInstall=%programdata%\chocolatey&& %programdata%\chocolatey\choco uninstall %PKGNAMEPKGNAMES% -y>"%programdata%\chocolatey\logs\wpkgchocoinstall.log"'/>
<!--
-->
</package>