[wpkg-users] Client service is only working on restart

Nicolas Briche nbriche at free.fr
Wed Jun 29 15:08:39 CEST 2016


Hi,

Le 2016-06-29 14:33, Ulli Conrad a écrit :
> Hi,
> 
> On 29.06.2016 at 14:22 Hans Meyer wrote:
> 
>> I'm using the client windows service but it is only installing new
>> software when I restart the complete windows pc.(client side) Is there 
>> a
>> config option that lets the service check every x minutes for new
>> software in the package config?
> 
> You could set up a scheduled task running "sc start wkpgservice" every
> x minutes. But have in mind that updating software might/will close
> running application to update it, users might loose data...

As a workaround, you might want to use the 'matchprocess' third-party 
tool, for example by adding

<variable name='CHECKPROC' 
value='%SOFTWARE_DEFAULT%\wpkg\tools\3rd-party\matchprocess\matchprocess.js' 
/>

in the <variables> section of your config.xml, then adding checks to 
your packages. As an example, my Citrix Receiver package:

<package
	id="citrix_receiver"
	name="Citrix Receiver"
	revision="%PKG_VERSION%"
	priority="10">

	<check type="uninstall" path="Citrix Receiver" 
condition="versionequalto" value="%PKG_VERSION%" />

	<variable name="PKG_VERSION" value="14.2.100.14" />

	<commands>
		<command type="preinstall" cmd='cscript %CHECKPROC% wfica32.exe' />

		<command type="install" include="preinstall" />

		<command type="install" include="remove">
			<condition>
				<check type="logical" condition="or">
					<check type="uninstall" condition="exists" path="Citrix XenApp 
Plugin pour applications hébergées" />
					<check type="uninstall" condition="exists" path="Citrix XenApp Web 
Plugin" />
					<check type="uninstall" condition="versiongreaterorequal" 
path="Citrix Receiver" value="14.3" />
				</check>
			</condition>
		</command>

		<command type="install" 
cmd='"%SOFTWARE%\Citrix\CitrixReceiver4.2.100.exe" /silent 
ALLOWADDSTORE=N ADDLOCAL=ReceiverInside,ICA_Client,USB' />

		<command type="upgrade" include="remove" />
		<command type="upgrade" include="install" />

		<command type="downgrade" include="upgrade" />

		<command type="remove" include="preinstall" />
		<command type="remove" 
cmd='"%SOFTWARE%\Citrix\ReceiverCleanupUtility.exe" /silent' />

	</commands>

</package>

By setting up a 'preinstall' stage with %CHECKPROC% and calling 
'preinstall' before either 'install' or 'remove', I'm ensuring that the 
package exits if the program is still running.

N.



More information about the wpkg-users mailing list