<?xml version="1.0" encoding="UTF-8"?>
<packages:packages xmlns:packages="http://www.wpkg.org/packages">
  <package id="pstools" name="PSTools" revision="%version%.1" priority="0" reboot="false">
    <variable name="version" value="2.45.1" />

    <!-- N.B. the installer takes care of creating and removing this reg key as needed -->
    <check type='registry' condition='equals' path='HKLM\software\ucam_wpkg.cam.ac.uk\pstools\version' value="%version%"/>

    <!-- the exe is built by https://gitlab.developers.cam.ac.uk/ch/co/wpkg/pstools-nsis; see README contained therein -->

    <install cmd='%wpkgsoftware%\microsoft.com\pstools\pstools-%version%.exe' />

    <upgrade include='remove' />
    <upgrade include='install' />

    <remove cmd='%wpkgsoftware%\wpkg\tools\waitforprocess.cmd pstools-uninstall.exe' />
    <remove cmd='cmd /c if exist c:\pstools\pstools-uninstall.exe c:\pstools\pstools-uninstall.exe' />
    <remove cmd='%wpkgsoftware%\wpkg\tools\waitforprocess.cmd pstools-uninstall.exe' />
  </package>
</packages:packages>