[wpkg-users] Fwd: WPKG running as local system unable to download profiles.xml file

Antony Awaida antony at apporto.co
Wed Jul 30 22:21:30 CEST 2014

So terribly sorry about the previously sent and truncated emails. Gmail
sends an email every time one hits the tab key! Pls ignore the previous

Hi Rainer:

Thanks for your response. I appreciate it.

Before I got your replies, I experimented with an alternate approach: 1) in
a first step, I download the XML files to disk. I then use the regular
WPKG.js code to parse the files and continue processing. You can see the
code further below.

This approach seems to work well and the XML files are correctly written to
disk and then parsed even when WPKG.js is running as Localsystem. However,
for some reason WPKG.js exits with no errors and fails to write the log
file. the system in question is a windows 7 Enterprise Service pack 1.

for( var i=0; i < filePaths.length; i++) {
var filePath = filePaths[i];
 dinfo("Reading XML file: " + filePath);
 var xmlHttpReq = new ActiveXObject("MSXML2.XMLHTTP");
xmlHttpReq.open("GET", "https://someurl/xml_out/profiles", false);

//WScript.Echo("XSLT :" + xmlHttpReq.responseText);

var fso, tf;
    fso = new ActiveXObject("Scripting.FileSystemObject");
        tf = fso.CreateTextFile("c:\\temp.xml", true);

 // Read XML file from file system.
 var xsl = new ActiveXObject("Msxml2.DOMDocument.3.0");
xsl.async = false;
 xsl.validateOnParse = false;
 WScript.Echo("XSLT :" + xsl.xml)
dinfo("XSLT: " + xsl.xml);

On Tue, Jul 29, 2014 at 11:55 PM, Rainer Meier <r.meier at wpkg.org> wrote:

> Hi Antony
> On 30.07.2014 00:51, Antony Awaida wrote:
>> I have identified the problem to be in the following piece of WPKG.js
>> code. So I
>> created the following script:
>> var xsl = new ActiveXObject("Msxml2.DOMDocument.3.0");
>> xsl.async = false;
>> xsl.validateOnParse = false;
>> xsl.load(filePath);
>>                  dinfo("XSLT: " + xsl.xml);
>> As expected the above script returns an empty xsl.xml when run as
>> LocalSystem.
>> However, when I changed the Msxml2.DOMDocument.3.0 to
>> Msxml2.DOMDocument.6.0,
>> WPKG does not seem to run.
> The code uses Microsoft XML framework objects. If you face issues with the
> objects you might try installing latest updates of Microsoft XML Framework.
> Though usually the problem is within authentication on network shares and
> different handling of SYSTEM account regarding network authentication which
> is out of scope for WPKG core development.
> I am usually running WPKG using WPKG client which also runs as system
> account but does also take care about proper network share credential setup.
> You might try two work-arounds:
> 1. Create service user rather than running WPKG service as SYSTEM account.
> 2. Instead of launching wpkg.js/cscript.exe directly as a SYSTEM service
> wrap it within a cmd.exe script which handles network authentication and
> credential setup (net use). The script should verify whether files on share
> are properly readable before invoking wpkg.js.
> Almost certainly your local SYSTEM account faces access denied on the
> network share when connecting to your share. Although this is a guess since
> you neither provide logs nor details on your setup (client type, patch
> level, how credential setup is done, server type, patch level, connection
> logs and traces...).
> br,
> Rainer

Antony Awaida
Apporto (Previously BizAppCenter)
Cell 415 999 4547

Antony Awaida
Apporto (Previously BizAppCenter)
Cell 415 999 4547
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20140730/28762d17/attachment-0003.html>

More information about the wpkg-users mailing list