Talk:Greenshot
From WPKG | Open Source Software Deployment and Distribution
I was not successful with the new example installation and went a different way:
Here is my packages.xml
<?xml version="1.0" encoding="UTF-8"?>
<packages:packages xmlns:packages="http://www.wpkg.org/packages"
xmlns:wpkg="http://www.wpkg.org/wpkg" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wpkg.org/packages xsd/packages.xsd">
<package
id="greenshot"
name="Greenshot"
revision="%version%"
priority="5"
reboot="false">
<variable name="fileversion" value="UNSTABLE-0.8.1.1486" />
<variable name="version" value="0.8.1.1486" />
<check type="file" condition="versionequalto" path="%PROGRAMFILES(x86)%\Greenshot\Greenshot.exe" value="%version%" />
<commands>
<command type="install" cmd='"%SOFTWARE%\greenshot\Greenshot-INSTALLER-%fileversion%.exe" /LOADINF="%SOFTWARE%\greenshot\greenshot.inf" /VERYSILENT /NORESTART --norun' />
<!-- the file Greenshot-defaults.ini will be deployed by active directory because I did not found a way to use wpkg to send Greenshot-defaults.ini to %appdata%\Greenshot -->
<command type="upgrade" cmd='"%SOFTWARE%\greenshot\Greenshot-INSTALLER-%fileversion%.exe" /LOADINF="%SOFTWARE%\greenshot\greenshot.inf" /VERYSILENT /NORESTART --norun' />
<command type="remove" cmd='"%PROGRAMFILES(x86)%\Greenshot\unins000.exe" /SILENT'>
<exit code="1" /> <!-- Returns 1 even when uninstall succeeds -->
</command>
</commands>
</package>
</packages:packages>
my greenshot.inf looks like this
[Setup]
Lang=de-DE
Dir=C:\Program Files (x86)\Greenshot
Group=Greenshot
NoIcons=0
SetupType=custom
Components=plugins,plugins\titlefix
Tasks=startup
I also took a Greenshot.ini out of %appdata%\greenshot removed the line with OutputFilePath= and OutputFileAsFullpath= renamed this file in Greenshot-defaults.ini and deployed it over active directory to all clients to %appdata%greenshot again (only possible with Windows 2k8 and Win7 pro/ulimate Clients). I did this, because I don't know a way to deploy a file with wpkg during startup to the %appdata% directory of the logged in user.
--Konus 13:51, 17 April 2012 (CEST)