In "Scripting a Corporate Update System (October 2002, http://www.winscriptingsolutions.com, InstantDoc ID 26360), I described a system for keeping corporate clients up-to-date. I discussed the architecture, the updater scripts that reside on the server-side central script repository, and the client files that the system uploads to each client. In Part 2 (November 2002, InstantDoc ID 26632), I explained the client-side building blocks required to run the updater scripts.
In this article, I describe a simple script for automating client-file installation. Next time, I'll describe how you can extend the script for more complex environments.
Simple Client-File Installation
The way in which you manage your enterprise will typically dictate whether you use a simple or complex method for installing the corporate-updatesystem client files. The simplest method for uploading these files is to embed them in your existing client installation-and-build process. For example, you can modify new systems' OS installation routines to include the corporate-updatesystem client files. However, if your enterprise doesn't use a central build process or the departments within your organization purchase clients as needed with a preinstalled OS, you'll have to take a different approach.
For example, you could provide each user access through an email link, 3.5" disk, or CD-ROM to a script that installs the client files and ask the user to run the script. However, you would need to be prepared to work with those users who didn't run the script. (I'll show you later how you can know which clients the corporate update system is managingi.e., which clients have run the scriptso that you can easily track down individuals who haven't.)
Automated Client-File Installation
Although a simple manual distribution system can work, an automated solution that uses a central machine to install the client files on all clients in your organization is better. However, because automated solutions can fail for a variety of reasons, you need to include processing to alert administrators when the automated solution fails for a particular client (I introduced the SendSimpleMailToAdmins subprocedure in Part 2 of this series for this purpose).
Automated Installation Steps
To automate the corporate-updatesystem client-fileinstallation process, you must perform several steps. First, you must select a machine (let's call it the installation server) that you can use to run jobs and execute scripts. This machine can be a server or a client on your network. Refer to "Scripting Solutions with WSH and COM: Scheduling Automated Tasks" (see "Related Articles in Previous Issues," page 11) for information about setting up such a machine. The installation server must be able to read and write to the folder that contains the log files, payload files, and crucial installers responsible for uploading files to the clients. I placed these components in the \\ScriptServer\Scripts\CUS\Installation folder (as I listed in Table 1 of the first article of this series). The \Logs subfolder stores installation log files for all attempted installations, and the \Client's CUS Folder subfolder stores the payload client files that the corporate update system uploads to every client.
Second, you must create an Active Directory (AD) group for the clients on your network that the corporate update system is managing. I called my group Centrally Managed PCs. I also added three constants (i.e., MGMT_GRP, MGMT_GRP_DN, and MGMT_GRP_ADSPATH) to CUSLibrary.vbs that let me reference the names of the clients in my AD group directly by using a distinguished name (DN) or by using an ADsPath. You'll need to edit the details in the library to match your AD group and domain names.
Third, you must create a scheduled task that regularly executes the script SimpleCUSClientTargetter.wsf, which Listing 1 shows. My scheduled task executes the script at the same time every day to install files on each client. SimpleCUSClientTargetter.wsf uses several constants and a function in the library file CUSLibrary.vbs. One of the functions that the listing calls is CUSClientFilesInstaller, which copies the two payload files to each client. The techniques in "Scripting Solutions with WSH and COM: Scheduling Automated Tasks" can help you create the scheduled task if you're unfamiliar with the process.
Prev. page  
[1]
2
3
next page