[wpkg-users] newbie questions

Adam Thorn alt36 at cam.ac.uk
Tue Dec 15 13:10:28 CET 2015

> In many packages I see this line: check type="uninstall"
> condition="exists" path="filezilla" />
> The way I understand this is: Do not install, if software already exists
> on the machine. What I don't understand is on the "path" variable is
> only the software name. How does it know where to look?

See http://wpkg.org/Packages.xml#Uninstall - the "uninstall" check type 
looks in the registry under:


which is the list that populates the list you see in add/remove programs 
in Control Panel.

> What about the exit codes? Are the "exit codes" I've seen in the
> packages syntax for the purpose of
> displaying error messages if the install fails?

See http://wpkg.org/Packages.xml#Actions . By default, if any of the 
commands run by wpkg return non-zero exit code, wpkg will consider that 
to be a failure and stop running commands. If you want to note that a 
particular exit code for a command should actually be considered as 
success, then you can add e.g. <exit code="1" /> to ignore exit code of 
1, or <exit code="any" /> to accept any exit code as success. For 
example, http://wpkg.org/Flash_Player tries to use taskkill to kill 
Firefox.exe and iexplore.exe, but the taskkill will return a non-zero 
value if the programs aren't running. That shouldn't be considered a 
failure so far as wpkg is concerned, so <exit code=... /> is used to 
permit that.


More information about the wpkg-users mailing list