BBWin

"BBWin is an open source client for Windows working with BigBrother or Xymon(Hobbit) monitoring software." [[1]]

<package id="bbwin" name="BBWin" revision="%version%.13" priority="0" reboot="false">
<variable name="version" value="0.13" />

<variable name="bbcfg_file" value="%software%\sourceforge.net\bbwin\bbwin-x86.cfg" architecture="x86" />
<variable name="bbcfg_file" value="%software%\sourceforge.net\bbwin\bbwin-x64.cfg" architecture="x64" />

<check type="logical" condition="and"> 
<!-- date check ought to work but doesn't, for unknown reason. try again some time, perhaps -->
<!-- <check type="file" condition="datemodifynewerthan" path="%programfileswpkg%\bbwin\ext\software.vbs" value="2012-06-29 15:30" /> -->
<check type="file" condition="exists" path="%programfileswpkg%\bbwin\etc\bbwin.cfg" />
<check type="file" condition="exists" path="%programfileswpkg%\bbwin\bin\smartctl.exe" />
<check type="file" condition="exists" path="%programfileswpkg%\bbwin\bin\smartd.exe" />
<check type="uninstall" condition="exists" path="BBWin %version%"/>
</check> 

<install cmd='msiexec /qn /norestart /i "%software%\sourceforge.net\bbwin\bbwin_%version%.msi"' />
<install cmd='cmd /c copy "%bbcfg_file%" "%programfileswpkg%\bbwin\etc\bbwin.cfg"' />
<install cmd='cmd /c copy "%software%\sourceforge.net\bbwin\selfupdate.cmd" "%programfileswpkg%\bbwin\ext\" '/>
<install cmd='cmd /c "%software%\sourceforge.net\bbwin\setbbhostname.cmd"' />
<install cmd='cmd /c copy "%software%\sourceforge.net\bbwin\smartd.exe" "%programfileswpkg%\bbwin\bin\" '/>
<install cmd='cmd /c copy "%software%\sourceforge.net\bbwin\smartctl.exe" "%programfileswpkg%\bbwin\bin\" '/>
<install cmd='net start bbwin'><exit code='2'/></install>

<upgrade cmd='net stop bbwin'><exit code='any'/></upgrade>
<upgrade cmd='msiexec /qn /norestart /u "%software%\sourceforge.net\bbwin\bbwin_0.12.msi"' />
<upgrade cmd='msiexec /qn /norestart /i "%software%\sourceforge.net\bbwin\bbwin_%version%.msi"' />
<upgrade cmd='cmd /c copy "%bbcfg_file%" "%programfileswpkg%\bbwin\etc\bbwin.cfg"' />
<upgrade cmd='cmd /c "%software%\sourceforge.net\bbwin\setbbhostname.cmd"' />
<upgrade cmd='cmd /c copy "%software%\sourceforge.net\bbwin\smartd.exe" "%programfileswpkg%\bbwin\bin\" '/>
<upgrade cmd='cmd /c copy "%software%\sourceforge.net\bbwin\smartctl.exe" "%programfileswpkg%\bbwin\bin\" '/>
<upgrade cmd='net start bbwin'><exit code='2'/></upgrade>

<remove cmd='net stop bbwin'><exit code='any'/></remove>
<remove cmd='MsiExec.exe /qn /x{B0E67C4E-D046-44C7-9571-85AB9D46F180}' />
<remove cmd='cmd /c rmdir /s /q "%programfileswpkg%\bbwin"' />

</package>