[wpkg-users] Strange behavior of WPKG Client

chiddie claudio.ghirardi at geniaware.com
Mon Dec 19 14:55:00 CET 2011




Hello,

> If it's related to WPKG in some way, this could be an issue: one of the
> checks fails instead of being successful and thus the program is
> re-installed.
I think it's quite clear then: if you run the domain script on startup
without checking if WPKG client is already present, then the WPKG 
Service and the Domain Script run simultaneously ...
IMHO WPKG service normally checks, if wpkg.js is already running, and 
does nothing then. These are the majority of machines ... But if WPKG 
service is running first, and then your domain script, it doesn't check 
but just starts wpkg.js with your parameters.

I see. I imagined something like this also. I had excluded it only because
it does not happen on every machine.

>
> The odd thing is that some machines that did non report the error on
> friday
> (infact on friday the WPKG client has not been reinstalled on that
> machines)
> has the error today and viceversa.
Yes that's clear too, since it's perhaps a timing problem if WPKG 
service or domain script starts first.

I think you have two options

- just delete/deactivate the domain script, since wpkg client has been
   deployed to all machines probably in the mean time, or

- use a script which first checks if %programfiles\wpkg\wpkginst.exe is 
present, e.g. wpkginstall.cmd containing

if exist %programfiles\wpkg\wpkginst.exe exit 0
\\serverip\WPKG\wpkg.js /install:WPKG_Client /quiet /nonotify /noreboot

I think this could be enough.



I created a file called wpkg_client_install.cmd and put it into a
\\serverip\wpkg\software\wpkg client\.

The file contains the following lines:

if exist %programfiles%\wpkg\wpkginst.exe exit 0
\\192.168.1.2\WPKG\wpkg.js /install:WPKG_Client /quiet /nonotify /noreboot

How can i see if it's working? I have tested it on my pc, but my pc was one
of the pcs that did not have the issue.

And, in the meantime, i have one more question: how do WPKG parse the
hosts.xml and/or the optional hosts folder?

I have created a hosts folder, thus i have modified the hosts.xml file under
\\serverip\wpkg to contain only the following lines:
================================
<?xml version="1.0" encoding="UTF-8"?>

<wpkg>

</wpkg>
================================
I then created a hosts folder \\serverip\wpkg\hosts in order to better
manage the hosts and the profiles related to the hosts.

I created a file called "WPKG_Client_hosts.xml" (to tell WPKG to deploy the
client in the startup script we are discussing) that contains only the
following lines:
==========================================
<?xml version="1.0" encoding="UTF-8"?>

<wpkg>

    <host group="Domain Computers" profile-id="WPKG_Client" />

</wpkg>
=========================================

I then created a second file called Incredibuild_Agent_hosts.xml (in order
to try a silent install on my pc only) that contains the following lines:
=========================================
<?xml version="1.0" encoding="UTF-8"?>

<wpkg>

    <host name="MYPC" profile-id="IncrediBuild Agent" />

</wpkg>
=========================================

Now, if i restart the WPKG Service, the Incredibuild program is installed,
but the log says:
=========================================
2011-12-19 14:30:04, DEBUG   : Profiles applying to the current
host:|IncrediBuild Agent|
=========================================

Should not the WPKG_Client package from before apply too? If i continue
reading the log, i see that WPKG correctly checks if WPKG_Client is
installed:
=========================================
2011-12-19 14:30:04, DEBUG   : Found installed package 'WPKG_Client'
(WPKG_Client).
2011-12-19 14:30:04, DEBUG   : Package 'WPKG_Client' (WPKG_Client) found in
profile packages.
2011-12-19 14:30:04, DEBUG   : Number of packages to remove: 0
2011-12-19 14:30:04, DEBUG   : Going to install package 'WPKG_Client'
(WPKG_Client), Revision 1.3.14 x64, (execute flag is '', notify flag is
'true').
2011-12-19 14:30:04, DEBUG   : Package 'WPKG_Client' (WPKG_Client): Not yet
processed during this session.
2011-12-19 14:30:04, DEBUG   : Comparing version: '1.3.14 x64' <=> '1.3.14
x64'.
2011-12-19 14:30:04, DEBUG   : Checking existence of package: WPKG_Client
2011-12-19 14:30:04, DEBUG   : Reading variables from hosts[s]
2011-12-19 14:30:04, DEBUG   : Reading variables from profile[s]
2011-12-19 14:30:04, DEBUG   : Getting profiles which apply to this node.
2011-12-19 14:30:04, DEBUG   : Reading variables from profile IncrediBuild
Agent
2011-12-19 14:30:04, DEBUG   : Reading variables from package 'WPKG_Client'.
2011-12-19 14:30:04, DEBUG   : Got variable 'PKG_PATH' of value
'\\servername\wpkg\software\WPKG Client'
2011-12-19 14:30:04, DEBUG   : Setting variable:
'PKG_PATH=\\servername\wpkg\software\WPKG Client'.
2011-12-19 14:30:04, DEBUG   : Uninstall entry 'WPKG' matches string 'WPKG'.
2011-12-19 14:30:04, DEBUG   : Uninstall entry for WPKG was found: test
successful.
2011-12-19 14:30:04, DEBUG   : Saving unsorted settings to
'C:\Windows\System32\wpkg.xml'.false
2011-12-19 14:30:04, DEBUG   : Saving XML : C:\Windows\System32\wpkg.xml
2011-12-19 14:30:04, DEBUG   : Trying to find version of C:\Program
Files\wpkg\wpkginst.exe
2011-12-19 14:30:04, DEBUG   : Obtained version '1.0.0.22'.
2011-12-19 14:30:04, DEBUG   : Comparing version: '1.0.0.22' <=> '1.0.0.22'.
2011-12-19 14:30:04, DEBUG   : Checking file version 1.0.0.22 is
versionequalto (than) 1.0.0.22 - got result 0.
2011-12-19 14:30:04, DEBUG   : File version check for file 'C:\Program
Files\wpkg\wpkginst.exe' returned true for operation type versionequalto.
2011-12-19 14:30:04, DEBUG   : Searching for previously executed checks with
attributes type='file', condition='versionequalto',
path='%PROGRAMFILES%\\wpkg\\wpkginst.exe', value='1.0.0.22'
2011-12-19 14:30:04, DEBUG   : Unable to find any previously executed checks
with these attributes.
2011-12-19 14:30:04, DEBUG   : Saving unsorted settings to
'C:\Windows\System32\wpkg.xml'.false
2011-12-19 14:30:04, DEBUG   : Saving XML : C:\Windows\System32\wpkg.xml
2011-12-19 14:30:04, DEBUG   : Package 'WPKG_Client' (WPKG_Client): Already
installed.
===========================================

But should not i have seen before something like:
===========================================
2011-12-19 14:30:04, DEBUG   : Profiles applying to the current
host:|IncrediBuild Agent| |WPKG_client|
===========================================
instead of the only Incredibuild profile?

Intrigued by this, i added a third .xml in the hosts folder, called
Standard_Applications_hosts.xml, that contains the following lines:
===========================================
<?xml version="1.0" encoding="UTF-8"?>

<!-- Lists host names and associated profile. This file can be edited
     directly, or even created automatically depending on your
     environment. 
     
     For more info, see http://wpkg.org/index.php/Category:Documentation -->

<wpkg>

    <!--host name="ultima" profile-id="Test" / -->
	<!--host name="ultima" profile-id="WPKG_Client" / -->
	
	<host group="Domain Computers" profile-id="Standard Applications" >
		<profile id="7-Zip" />	
	</host >

</wpkg>
===========================================

But when i restart the service again, the new install profiles contained in
this new host are completely ignored by WPKG. The log continue to say that
the only profile that apply to this host is the IncrediBuild one.:
===========================================
2011-12-19 14:30:04, DEBUG   : Profiles applying to the current
host:|IncrediBuild Agent|
===========================================
WPKG_Client existence is still checked, while 7-Zip check/installation are
totally ignored.

So, the question obviously is: why are the WPKG_Client, the Standard
Applications profile and the 7-Zip profile not seen by WPKG when it runs?
-- 
View this message in context: http://old.nabble.com/Strange-behavior-of-WPKG-Client-tp32986763p33002832.html
Sent from the WPKG - Users mailing list archive at Nabble.com.




More information about the wpkg-users mailing list