To deploy application, there are two main use cases. The first one is based on a share network, the second is based on a DVD distribution. These cases have their own constraints and answer to specific needs. The main advantage to have a centralised application deploying system is to allow to a system administrator to have a consistency application park.
Note: If you manage a unique PC connected to Internet, the easiest way is to let each application managing its own upgrades (automatically or manual way).
The use of a network share implies that the pc is connected to a local network, with an available file server. This use case is recommended for SOHO application deploying (less than 10 pc) and allows silent installation of patches or new applications.
The use of a DVD is attractive for use in a standalone and non connected environment (e.g. Industrial PC or access control management console).
But, these two use cases comply with the following steps:
- Tune your environment
- Build the application list to deploy
- Build the medium
- Deploy applications from a DVD or Network share
By default, you have nothing to tune. The default values of environment variables allows a working with the following features:
- all action, expect debug one, are only logged in a text file named appdeploy.log in the
%SystemRoot%
directory (typically C:\Windows\appdeploy.log). - the applist files (at least applist-all.txt) are stored in the appstore directory located at the same level that the directory containing the appdeploy script.
If these features do not comply with your need, you must consider tuning the environment variables. The most efficient way to do that is to use init and exit hook scripts. See init.cmd.example and exit.cmd.example located in the directory containing the appdeploy script. in to have examples.
- To change the location of applist files and installers packages, you must tune the APP_STORE_DIR environment variable.
- To change the level of messages logged, you must tune the LOGLEVEL environment variable.
- To receive an email with a summary and detailed informations on actions done by lAppUpdate, you must tune the LOGMAIL environment variable, and specifies your account mail configuration in SMTP_SERVER (eventually SMTP_SERVER_PORT), FROM_MAIL_ADDR and TO_MAIL_ADDR environment variables.
- To run the script in an interactive mode (i.e. following installation actions in real time through the command shell), you must tune the SILENT environment variable.
The appdeploy script uses two applist files to verify which
applications were installed and if it needs to be updated: the first one is
named applist-all.txt and must be exist even if it is empty; the second
is named applist-.txt where <set>
is the argument passed to appdeploy
on the command line (e.g. .\appdeploy dummy
).
Note: applist file may be empty including applist-all.txt.
These files are text file complying with the Windows standard. So you can use any text editor (e.g. notepad, notepad++, vim...) to edit them.
The applist topic details the format of these files.
In fact, you can have so much file as you want according to your needs. For example, you can have an applist file per computer or a set of computer (e.g. children, purchasing department...). If you use a domain controller, you can match applist files with your Organisational Units (OU).
By default, the applist files are stored in the appstore directory located at the same level that the directory containing the appdeploy script. To change the location of applist files and installers packages, you must tune the APP_STORE_DIR environment variable.
A way of making is to store installers into the same directory that applist files with a separate folder for each product (Mozilla Firefox and its extension may be considered as one product). It clarifies the installers organisation and allow to have a postinstall hook script for each of them.
#appArch; appName; appVersion; appPackage; appArgs
; Adobe Reader XI - Français; 11.0.08; %APP_STORE_DIR%\AdobeReader\AdbeRdr11008_fr_FR.exe
x64; Java 7 Update 67 (64-bit); 7.0.670; %APP_STORE_DIR%\Java\jre-7u67-windows-x64.exe ; /s
x86; 7-Zip 9.20; 9.20.00.0; %APP_STORE_DIR%\7-zip\7z920.msi
The appdeploy script is designed to be independent from the type of used media. This can be a network share reached from its UNC name (e.g. \myserver\share), a DVD or CD, a USB Stick or any removable media. Thus the media building is limited to copy files or use your favourite CD/DVD burner utility.
The medium must contain the directory with installers (see 'How to build the application list') according to the APP_STORE_DIR environment variable and the following files from the appdeploy directory:
- appdeploy.cmd
- _appfilter.vbs
- _log2mail.vbs
- exit.cmd (optional)
- init.cmd (optional)
The below block show a typical file tree for a media of deployment.
\
├───appdeploy
│ appdeploy.cmd
│ _appfilter.vbs
│ _log2mail.vbs
│ __exit__.cmd
│ __init__.cmd
│
└───appstore
│ applist-all.txt
│ applist-dummy.txt
│
├───dummy
│ aninstaller.cmd
│ aninstaller.msi
│
└───extended dummy
aninstaller.cmd
__postinstall__.cmd
he phase of deployment start by calling appdeploy script from a command shell. The only argument to pass is the set name according to your organisation choice (see How to build the application list)
As any installation of program, you must launch the script with administrator
privilege (right click on the command prompt link, and choose run as administrator
) .
C:>d:\appdeploy\appdeploy.cmd dummy
The phase of deployment start by calling appdeploy script from a command shell. The only argument to pass is the set name according to your organisation choice (see How to build the application list)
As any installation of program, you must launch the script with administrator
privilege (right click on the command prompt link, and choose run as administrator
) .
To push system integration further, you can call this script from a schedule task with the sending of an summary mail (see How to tune your environment).
C:>\myserver\share\appdeploy.cmd dummy
This file was automatically generated by TiddlyWiki.