Difference between revisions of "FAQ"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(I'm getting a Scripting host error "Automation server can't create object" and then wpkg exits)
(I'm getting a Scripting host error "Automation server can't create object" and then wpkg exits)
Line 33: Line 33:
 
And it will tell you where you made an error/typo.
 
And it will tell you where you made an error/typo.
  
== I'm getting a Scripting host error "Automation server can't create object" and then wpkg exits ==
+
== I'm getting a Scripting host error "Automation server can't create object" and then WPKG exits ==
  
 
One cause for this is missing the MSXML2.domdocument.3.0 object. This will occur on a fresh install of Windows 2000 with IE5. Installing IE6 will install the required component.
 
One cause for this is missing the MSXML2.domdocument.3.0 object. This will occur on a fresh install of Windows 2000 with IE5. Installing IE6 will install the required component.
  
 
Installing new MDAC Components (MDAC_TYP.exe, at least 2.8 SP1) will do the job too.
 
Installing new MDAC Components (MDAC_TYP.exe, at least 2.8 SP1) will do the job too.
 +
 +
 +
== I'm getting an error "Event log file is full", and then WPKG exits ==
 +
 +
When you run WPKG as Administrator, it gives you an error, and doesn't run:
 +
 +
C:\>cscript \\server\wpkg\wpkg.js /synchronize /quiet /nonotify
 +
 +
\\server\wpkg\wpkg.js(2276, 5) (null): Event log file is full.
 +
 +
Users of German version of Windows will get "Die Ereignisprotokolldatei ist voll".
 +
 +
As the error say, your Event log is full. Either clean it, or don't log what WPKG does to the Event Log.
 +
 +
WPKG logs to the Event Log when /quiet flag is used. So, don't use this flag, and start WPKG like below:
 +
 +
cscript \\server\wpkg\wpkg.js /synchronize /quiet /nonotify >nil
  
 
== Your examples use a server with WPKG share accessible by everybody. My server is password protected or is a Domain Controller and I can't access it without first logging to it. How can I configure WPKG to access a username/password protected share? ==
 
== Your examples use a server with WPKG share accessible by everybody. My server is password protected or is a Domain Controller and I can't access it without first logging to it. How can I configure WPKG to access a username/password protected share? ==

Revision as of 15:26, 19 September 2006

WPKG FAQ

If you think you have an answer to an important question regarding WPKG, please place it here.



Is there a GUI for WPKG?

Not at the moment. But we plan to build a http backend. Check this page for details.


I modified WPKG a bit and added a feature. Can I contribute it?

Sure! Don't hesitate to inform us - if you want to contribute to development of WPKG, join the mailing list and let us know!


Do you have any examples of how to setup installing/uninstalling of programs using WPKG?

There are basic examples in the WPKG package if you download it.

You will find working examples in the Silent Installers category (you may need to modify paths to match your setup of course).

I'm getting "Unable to load specified XML document from \\server\wpkg\packages.xml" error. But packages.xml is there!

If you already checked that this file is really there, check this file for errors / typos. A common error could be missing quotation-marks ( " ), or if they are in a wrong place, or if there are two of them in a place only one is needed, or...

Try running WPKG with a /debug flag:

cscript \\server\wpkg\wpkg.js /synchronize /debug

And it will tell you where you made an error/typo.

I'm getting a Scripting host error "Automation server can't create object" and then WPKG exits

One cause for this is missing the MSXML2.domdocument.3.0 object. This will occur on a fresh install of Windows 2000 with IE5. Installing IE6 will install the required component.

Installing new MDAC Components (MDAC_TYP.exe, at least 2.8 SP1) will do the job too.


I'm getting an error "Event log file is full", and then WPKG exits

When you run WPKG as Administrator, it gives you an error, and doesn't run:

C:\>cscript \\server\wpkg\wpkg.js /synchronize /quiet /nonotify
\\server\wpkg\wpkg.js(2276, 5) (null): Event log file is full.

Users of German version of Windows will get "Die Ereignisprotokolldatei ist voll".

As the error say, your Event log is full. Either clean it, or don't log what WPKG does to the Event Log.

WPKG logs to the Event Log when /quiet flag is used. So, don't use this flag, and start WPKG like below:

cscript \\server\wpkg\wpkg.js /synchronize /quiet /nonotify >nil

Your examples use a server with WPKG share accessible by everybody. My server is password protected or is a Domain Controller and I can't access it without first logging to it. How can I configure WPKG to access a username/password protected share?

This is an advanced setup, and somehow unsecure (keeping passwords in plain files) - think of it as just an idea. Certainly you should consider easier and safer installation methods before.

An easy way to do so is to run WPKG service as domain\domainusername.


An alternative way is below.

Considering, you are running Samba, and your WPKG share is configured like below:

[wpkg]

 comment = Windows Packager
 path = /home/samba/wpkg
 read only = yes
 browseable = no
 valid users = unattended
 guest ok = no

which means, that only user unattended can access that share, you have to configure your clients to access/mount this share *before* cscript.exe is instructed to run wpkg.js.

This means you have to do the following:

1) setup different registry entries on your clients with a different install-service.js file, 2) create a directory not accessible by normal users, which will contain a file with username and a password to access WPKG share, 3) instead of accessing our share using \\server\wpkg\packages, we will mount them as W:\

install-service.js file for username/password protected shares should look like below:

 var WshShell = WScript.CreateObject("WScript.Shell");
 var srvKey = "HKLM\\SYSTEM\\CurrentControlSet\\Services\\Windows Packager\\Parameters\\";
 var appKey = srvKey + "Application";
 var srvPath = "C:\\NETINST\\wpkg-start.bat"
 WshShell.RegWrite(appKey, srvPath, "REG_SZ");


Then, on a Windows client, create a directory C:\NETINST - it has to be accessible by Administrator and SYSTEM account *only*. cacls /? from a command line on your client explains how to set up access permissions on files and directories.

Next step is to create a C:\NETINST\wpkg-start.bat file, which will mount username/password protected WPKG shares, execute wpkg.js, download files if necessary, and unmount the shares. This is the content of this file:

 net use W: \\server\wpkg /user:domain\unattended password
 cscript W:\wpkg.js /synchronize /quiet
 net use W: /delete

See net use /? for a description of other options for mounting shares under Windows. Note that you might also change your wpkg-install.bat file (described in Documentation) and add similar net use entries, entries which will create C:\NETINST directory with necessary permissions, change the paths etc.

The last step is to edit your packages.xml definitions.

Instead of accessing packages using \\server\wpkg\packages path, we have to use W:\packages. So just change something like:

  <install cmd="msiexec /i \\server\wpkg\packages\acrobatreader6\AdobeReader6.0.msi /q allusers=1">

to:

   <install cmd="msiexec /i W:\packages\acrobatreader6\AdobeReader6.0.msi /q allusers=1">

and everything should work flawlessly with a username/password protected server.