Difference between revisions of "FAQ"
(→I installed an application with WPKG. Then, I uninstalled that appliation manually, using Control Panel (Software Add/Remove). WPKG doesn't reinstall those applications, why?) |
|||
Line 104: | Line 104: | ||
Many of the silent installs are listed with %SOFTWARE% as a placeholder for the location of the installation files. If your installation files are for licensed software then there is probably something in the license that says you have to control access to the install files. If you set the %software% environment variable globally then any command prompt will reveal the location of these files. You can prevent this by setting the variable in the wpkg-start.bat batch file so that it only affects that "session". It also keeps all the environment variable settings for WPKG as part of the WPKG script and ensures the variable is set before the script runs. | Many of the silent installs are listed with %SOFTWARE% as a placeholder for the location of the installation files. If your installation files are for licensed software then there is probably something in the license that says you have to control access to the install files. If you set the %software% environment variable globally then any command prompt will reveal the location of these files. You can prevent this by setting the variable in the wpkg-start.bat batch file so that it only affects that "session". It also keeps all the environment variable settings for WPKG as part of the WPKG script and ensures the variable is set before the script runs. | ||
+ | |||
+ | |||
+ | == Logging: How to change the amount of log output? == | ||
+ | |||
+ | WPKG 1.0 and up supports a logging feature where you can write a log file. You can use the /logLevel:<level> switch to change the amount of output written to the log file. The log level is actually defined using a bitmask. This allows you to independently enable logging of | ||
+ | - errors | ||
+ | - warnings | ||
+ | - information | ||
+ | - audit success | ||
+ | - audit failure | ||
+ | |||
+ | However in productive environment it is recommended to use a logLevel setting of 3 to log errors and warnings only (some might also use a value of 7 to add informational output as well). Higher log levels will lead to lots of ugly debug output which is probably only useful for package debugging. | ||
+ | |||
+ | Note: You might set the logLevel="3" attribute at the profile node as well. This allows you to apply a different (probably debug-level) logLevel to the profile you're using in your testbed while keeping the default log level of 3 for productive use. | ||
+ | |||
+ | Please also note that the logLevel will only influence the amount of output written to the log file. It does not affect the amount of output written to the console. If you're running WPKG from the command-line logLevel will not have any effect on the output there. To receive debug output on the console you need to use the /debug command-line switch. This allows WPKG client to run WPKG in the background as a service without using the /debug flag but using the /silent switch so no output is written to an invisible console - instead administrators can control the amount of output written to the logs by specifying logLevel either on the called command line or (more convenient from my point of view) within [[config.xml]]. | ||
+ | |||
[[category:Documentation]] | [[category:Documentation]] | ||
[[category:Installation]] | [[category:Installation]] |
Revision as of 07:55, 9 January 2008
WPKG FAQ
If you think you have an answer to an important question regarding WPKG, please place it here.
Contents
[hide]- 1 WPKG doesn't work... WPKG doesn't install my application... How can I make sure WPKG works? Please help me...
- 2 I installed an application with WPKG. Then, I uninstalled that appliation manually, using Control Panel (Software Add/Remove). WPKG doesn't reinstall those applications, why?
- 3 Is there a GUI for WPKG?
- 4 I modified WPKG a bit and added a feature. Can I contribute it?
- 5 Do you have any examples of how to setup installing/uninstalling of programs using WPKG?
- 6 I'm getting "Unable to load specified XML document from \\server\wpkg\packages.xml" error. But packages.xml is there!
- 7 I'm getting a Scripting host error "Automation server can't create object" and then WPKG exits
- 8 I'm getting an error "Event log file is full", and then WPKG exits
- 9 I'm getting an error 'Input Error: There is no script engine for file extension ".js".', and WPKG won't start
- 10 Silent installs and the %SOFTWARE% Environment variable
- 11 Logging: How to change the amount of log output?
WPKG doesn't work... WPKG doesn't install my application... How can I make sure WPKG works? Please help me...
The first step to make sure if WPKG works properly is to start it from command line manually with "/debug" flag:
C:\>cscript \\server\wpkg\wpkg.js /synchronize /debug
This will display in detail what WPKG does.
Other things worth checking:
- %SystemDirectory%\wpkg.xml (typically, C:\Windows\system32\wpkg.xml)
- This file contains a "database" of apps installed with WPKG (and scripts executed, etc.).
- If WPKG was started with /quiet flag, it will log to Windows Event Log.
- If you use WPKG Client, add a /debug flag to WPKG parameters and check "Show GUI" to see the output. You will also want to configure detailed logging in config.xml.
I installed an application with WPKG. Then, I uninstalled that appliation manually, using Control Panel (Software Add/Remove). WPKG doesn't reinstall those applications, why?
You probably uninstalled a package which does not supply appropriate package checks. WPKG offers the possibility to verify the package installation-status by checking the uninstall entries as they show up in the control panel. If you remove a package where you did not define any check WPKG has no possibility to verify if the package is still installed properly. To prevent having to re-install the package each time a local settings file (wpkg.xml) will be maintained by WPKG. This file keeps track of all packages installed.
Therefore you should make sure that if ever possible your package contains meaningful checks which allows WPKG to detect an uninstalled package in a reliable way. In most cases an uninstall check or a file check on an essential application binary (e.g. the main executable) would do the job.
Again: If you do not specify any checks WPKG cannot verify the install state of a package. Therefore it will not be re-installed after manual remove. WPKG simply trusts the package entry within wpkg.xml. If you specify checks then it allows WPKG to detect a removed package.
Of course you can also manually remove the corresponding entry within wpkg.xml but this is not recommended. Instead you should probably provide a new version of the package with appropriate checks. WPKG will then detect that the new version is available and do an upgrade.
Is there a GUI for WPKG?
Yes. If you think about a management tool, then check WPKG Web Interface for details.
If you want a tool which lets you deploy WPKG on clients, check WPKG_Client site.
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 is the easiest solution - it will install the required component automatically.
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". Users of French version of Windows will get "Le journal d'�v�nements est plein".
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 /nonotify >nul
It is generally a good idea to start most of the <install cmd
commands in a quiet way (there are sometimes quiet switches), or redirect their output to >nul. Examples of such commands are copy, xcopy, robocopy, del etc.
The problem can be avoided by changing the default settings for Windows logging, which are too small. Open the Event Viewer, select the Application Log, and choose Properties from the Action menu. You can increase the maximum log size and change the setting to overwrite events, so the log file will not get filled. You can probably set up a silent install package to make these changes on all your workstations by editing registry keys. See HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\logfile.
I'm getting an error 'Input Error: There is no script engine for file extension ".js".', and WPKG won't start
If you have an HTML editor that has associated Javascript Source files (.JS) to it, then the CSCRIPT or WSCRIPT engine won't know which engine to use for the .js file. So, issue the following command from the command prompt to get it to work
C:\>ASSOC .JS=JSFile
Important: Make sure you have the capitalization correct... or else it could yell at you... especially the ".JS=JSFile".
Silent installs and the %SOFTWARE% Environment variable
Many of the silent installs are listed with %SOFTWARE% as a placeholder for the location of the installation files. If your installation files are for licensed software then there is probably something in the license that says you have to control access to the install files. If you set the %software% environment variable globally then any command prompt will reveal the location of these files. You can prevent this by setting the variable in the wpkg-start.bat batch file so that it only affects that "session". It also keeps all the environment variable settings for WPKG as part of the WPKG script and ensures the variable is set before the script runs.
Logging: How to change the amount of log output?
WPKG 1.0 and up supports a logging feature where you can write a log file. You can use the /logLevel:<level> switch to change the amount of output written to the log file. The log level is actually defined using a bitmask. This allows you to independently enable logging of - errors - warnings - information - audit success - audit failure
However in productive environment it is recommended to use a logLevel setting of 3 to log errors and warnings only (some might also use a value of 7 to add informational output as well). Higher log levels will lead to lots of ugly debug output which is probably only useful for package debugging.
Note: You might set the logLevel="3" attribute at the profile node as well. This allows you to apply a different (probably debug-level) logLevel to the profile you're using in your testbed while keeping the default log level of 3 for productive use.
Please also note that the logLevel will only influence the amount of output written to the log file. It does not affect the amount of output written to the console. If you're running WPKG from the command-line logLevel will not have any effect on the output there. To receive debug output on the console you need to use the /debug command-line switch. This allows WPKG client to run WPKG in the background as a service without using the /debug flag but using the /silent switch so no output is written to an invisible console - instead administrators can control the amount of output written to the logs by specifying logLevel either on the called command line or (more convenient from my point of view) within config.xml.