Difference between revisions of "FAQ"
m |
m (→How can I script installation of packages if they can't be installed quietly, without user intervention?) |
||
| Line 5: | Line 5: | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 09:20, 18 July 2006
WPKG FAQ
If you think you have an answer to an important question regarding WPKG, please place it here.
Contents
- 1 Is there a GUI for WPKG?
- 2 I modified WPKG a bit and added a feature. Can I contribute it?
- 3 Do you have any examples of how to setup installing/uninstalling of programs using WPKG?
- 4 I'm getting "Unable to load specified XML document from \\server\wpkg\packages.xml" error. But packages.xml is there!
- 5 I'm getting a Scripting host error "Automation server can't create object" and then wpkg exits
- 6 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?
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 WPGK package if you download it. Below - some more examples. You will find some more examples in examples section.
You will find working examples in the Silent Installers category (you may need to modify paths to match your setup of course).
This is an example hosts.xml file - it lists host names and associated profile:
<wpkg>
<host name="pc001" profile-id="profile01" /> <host name="pc002" profile-id="profile01" /> <host name="pc003" profile-id="profile01" /> <host name="pc004" profile-id="profile01" /> <host name="pc005" profile-id="profile01" /> <host name="pc106" profile-id="profile02" /> <host name="pc107" profile-id="profile02" /> <host name="pc108" profile-id="profile02" /> <host name="pc109" profile-id="profile02" /> <host name="pc110" profile-id="profile02" />
</wpkg>
This is an example profiles.xml - it lists profiles available to the workstations:
<profiles>
<profile id="default">
<package package-id="office2000" />
</profile>
<profile id="profile01">
<depends profile-id="default" />
<package package-id="acrobat" />
<package package-id="rdc" />
</profile>
<profile id="profile02">
<depends profile-id="default" />
<package package-id="rdc" />
</profile>
</profiles>
This is an example packages.xml - it list of all packages that can be deployed to workstations:
<packages>
<package
id="rdc"
name="Remote Desktop Connection"
revision="1"
reboot="false"
priority="0">
<check type="file" condition="exists" path="C:\WINNT\system32\mstsc.exe" />
<install cmd="msiexec /i \\server\unattended\packages\RemoteDesktopConnection\msrdpcli.msi /q allusers=1">
<exit code="0" />
</install>
<remove cmd="msiexec /x \\server\unattended\packages\RemoteDesktopConnection\msrdpcli.msi /q allusers=1" />
<upgrade cmd="" />
</package>
<package
id="acrobat"
name="Adobe Acrobat Reader"
revision="1"
reboot="false"
priority="0">
<check type="file" condition="exists" path="C:\Programme\Adobe\Acrobat 6.0\Reader\AcroRd32.exe" />
<install cmd="msiexec /i \\server\unattended\packages\acrobatreader6\AdobeReader6.0-Deutsch.msi /q allusers=1">
<exit code="0" />
</install>
<remove cmd="msiexec /x \\server\unattended\packages\acrobatreader6\AdobeReader6.0-Deutsch.msi /q allusers=1" />
<upgrade cmd="" />
</package>
<package
id="office2000"
name="office2000"
revision="1"
reboot="false"
priority="0">
<check type="file" condition="exists" path="C:\Programme\Microsoft Office\Office\WDREAD9.TXT" />
<install cmd="msiexec /i \\server\unattended\packages\MSOffice2000\data1.msi /q allusers=1">
<exit code="0" />
</install>
<remove cmd="msiexec /x \\server\unattended\packages\MSOffice2000\data1.msi /q allusers=1" />
<upgrade cmd="" />
</package>
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.
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.