Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


July 2005

Scan Your Network for Missing Office Updates

The Office Update Inventory Tool picks up where MBSA leaves off
RSS
Subscribe to Windows IT Pro | See More Systems Administration Articles Here | Reprints
Or get the Monthly Online Pass—only $5.95 a month!
SideBar    Using OHotFix When WSUS Isn’t an Option

Download the Code Here

Given the various worms, viruses, and exploits that target Microsoft Office components, keeping Office patched is almost as important as patching Windows is to your network's security. Together, Microsoft Baseline Security Analyzer (MBSA) and Windows Server Update Services (WSUS) do a good job of automating the process of managing Windows patches, but MBSA can scan only the local computer for missing Office patches.

Microsoft's Office Update Inventory Tool 2.1 gives you a way to scan your entire network for missing Office 2000 Service Release 1a (SR-1a) and later patches. This free tool can generate a report of missing Office updates for a group of computers. Although each computer must execute the tool locally, the inventory tool, unlike MBSA, can consolidate the scan results of all your computers into one actionable report.

Office Update Inventory Tool
The Office Update Inventory Tool comprises two executables: inventory.exe and convert.exe. Inventory.exe scans the local computer for Office applications and determines which applications are present, what updates are applicable to each application, and which of those updates have been installed. The Inventory component then creates a log file containing this information, names the file after the computer, and stores it in the specified output folder.

After running inventory.exe on each computer and directing all the log files to the same folder on the network, you run convert.exe once. Convert.exe collects all the log files and produces a consolidated report, which you can then use to asses the patch status of Office on your network.

How do you get the inventory tool to run on all computers on your network without logging on to each system and manually running the tool? Your options depend on the size of your network and how cooperative your users are. If you can depend on your users to cooperate, you can simply email everyone a link to the inventory tool. But for most networks, you'll want to automate the inventory process.

Obtaining an Inventory
To automate the Office Update Inventory Tool, you can include it in a startup or logon script that you configure through Group Policy. (To configure a startup or logon script, open any Group Policy Object—GPO—and navigate to Computer Configuration\Windows Settings\Scripts (Startup/Shutdown) or User Configuration\Windows Settings\Scripts (Logon/Logoff), respectively.) Alternatively, you can create a scheduled task. All three options have advantages. I like startup scripts because they run under the authority of the local system, so there's no question about whether the inventory program will be able to complete. However, startup scripts execute only when the computer reboots, and most servers—and even many workstations—don't reboot regularly.

Logon scripts run each time the user logs on, but they run under the authority of the current user, who might not have the authority to run the inventory tool depending on how you configure security on workstations. Additionally, most servers can go for long periods without someone logging on at the console, which could delay scanning for or deploying important security patches.

I prefer the scheduled task approach because you can control when the task is executed and specify an account that has sufficient authority to install software. The Schtasks utility lets you create a scheduled task on remote systems from the command line. However, Schtasks isn't available under Windows 2000—if you run Win2K, you'll need to use the At command instead.

Step 1: Install the Office Update Inventory Tool
First, you need to download and install the Office Update Inventory Tool.

  1. Create a shared folder to hold the inventory tool. I'll call the folder \\mtg1\oinventory.
  2. Download invcm.exe and invcif.exe, the two self-extracting executables that make up the inventory tool, from http://www.microsoft.com/office/orkarchive/2003ddl.htm.
  3. Run invcm.exe. When prompted, specify \\mtg1\oinventory as the location for extracting the files. After running invcm.exe, you'll find the inventory tool's executables (convert.exe, inventory.exe, and oudetect.dll) in \\mtg1\oinventory.
  4. Run invcif.exe and direct it to extract its files to \\mtg1\oinventory. In oinventory, you'll see a new subfolder called cifs and a few new files, which constitute the database of all available Office updates. Whenever Microsoft releases an update for Office, the company also releases a new version of invcif.exe. Note that the database doesn't include the actual updates—it just contains identity information that lets the inventory tool detect whether an update has been installed on the computer that's being scanned.
  5. Create a subfolder in \\mtg1\oinventory called invout. We'll direct the inventory tool to use this folder for outputting its log files.

Step 2: Scan Your Domain
To scan a single computer, you can now simply log on to the computer and run the following command from the Run dialog box or a command-shell window:

\\mtg1\oinventory\inventory.exe
  /s \\mtg1\oinventory\cifs  /o \\mtg1\oinventory\invout

You must type this command—and others provided in this article—all on one line.

To schedule a scan of a computer, you'd use the Schtasks command. For example, to schedule \\wkstn11 to run the inventory tool once at midnight on April 3, 2005, under the authority of an account named batchwork whose password is ksdkui#, you'd enter

schtasks /create
  /tn "Office Update Scan" 
/tr"\\mtg1\oinventory\inventory.exe
  /s \\mtg1\oinventory\cifs  /o \mtg1\oinventory\invout"
  /sc once /st 00:00:00
  /sd 04/03/2005 /s wkstn11
  /u batchwork /p "ksdkui#"

Schtasks can create a task on only one computer at a time, but you can use the For command to call Schtasks once for each computer in your domain. Here's how.

  1. First you need a file that lists all the computers in your domain. GetListOfComputers.vbs, which Listing 1 shows, outputs the name of each computer in your domain. To download GetListOfComputers.vbs, go to http://www.windowsitpro.com, enter 46623 in the InstantDoc ID text box, and click the 46623.zip link.
  2. Run the command
    cscript GetListOfComputers.vbs
      //nologo > computers.txt
    to produce a file called computers.txt that contains the name of every computer in your domain.
  3. Now, use the For command to read the list and call Schtasks for each computer. The command
    for /f  %x in (computers.txt)
      do schtasks /create
      /tn "Office inventory" 
    /tr "\\mtg1\oinventory\inventory.exe
      /s \\mtg1\oinventory\cifs  /o \\mtg1\oinventory\invout"
      /sc once /st 00:00:00
      /sd 08/03/2005 /s %x
      /u batchwork /p "ksdkui#"
    calls Schtasks once (/sc once) at midnight (/st 00:00:00) on August 3, 2005 (/sd 08/03/2005), for each computer listed in computers.txt. The /s switch specifies the computer on which Schtasks is called, and %x is the current computer name from the computers.txt file. The command runs under the user profile batchwork (/u batchwork) and uses the password ksdkui# (/p "ksdkui#").

For Win2K, you need to use the At command instead, as I mentioned earlier:

for /f  %x in (computers.txt)
  do at \\%x 00:00 
  /next:8/3/2005 
  "\\mtg1\oinventory\inventory.exe
  /s \\mtg1\oinventory\cifs  /o \\mtg1\oinventory\invout"

Step 3: Consolidate the Log Files
Run convert.exe manually to consolidate all the individual log files into one .xml file that you can analyze within Microsoft Excel. The command

\\mtg1\oinventory\convert
  /d \\mtg1\oinventory\invout
  /o \\mtg1\oinventory\results.xml
  /xml \\mtg1\oinventory\patchdata.xml

consolidates the log files into a file named results.xml.

   Previous  [1]  2  Next 


Reader Comments
Copying Scheduled Tasks between machines:
This may not be the best way to distribute software, but it does have its uses.
You can create the task on one machine then copy from \\sourceserver\admin$\tasks\taskname.job to all the other machines. I suggest using the For command as in
FOr /F %i in ('net view') Do copy \\sourceserver\admin$\tasks\taskname.job %i\admin$\tasks

Be sure to also copy any files that might be needed locally.

ilwinguru July 27, 2005 (Article Rating: )


Hi,

What about multiple Outlook junk email filters? When extracted, for example, updates 902953, 904631, 906173, 907492, they all extract to "OUTLFLTR.msp" and it's impossible to have them all in the same folder.

I have tried deploying multiple OUTLFLTR.msp files by having them in seperate directories, with the 3 ohotfix files in each directory. I use SMS 2003 to create a package that contains all of these updates. When deployed to a client, the process halts after the first update. How do you deploy MULTIPLE office updates when the .msp files extract to the SAME NAME?

test-admin December 16, 2005 (Article Rating: )


Corrected script. There were some syntax errors.

' BEGIN COMMENT
' cscript GetListofComputers.vbs //nologo > computers.txt
' This script outputs a list of all the computers in your domain.
' The only thing you need to modify is the value of yourDomain.
' Replace LDAP://DC=montereytechgroup,DC=com with the
' LDAP name of your domain.
' END COMMENT
yourDomain="'LDAP://DC=domain,DC=company,DC=com'"
Const ADS_SCOPE_SUBTREE = 2

' BEGIN COMMENT
' Connect to Active Directory.
' END COMMENT
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"

' BEGIN COMMENT
' Create a query for all computers in the domain.
' END COMMENT
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText = _
"Select cn from " & _
yourDomain & " where objectClass='computer'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
'wscript.echo objCommand.CommandText
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst

' BEGIN COMMENT
' Loop though all computers in the domain.
' END COMMENT
Do Until objRecordSet.EOF
' BEGIN COMMENT
' Write each computer name out to the file.
' END COMMENT
Wscript.Echo objRecordSet.Fields("cn").Value
objRecordSet.MoveNext
Loop

dmoxley May 03, 2006 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Learning Path An IT pro describes how he deploys patches over an NT network
"Patch Management Sans WSUS"


Learn how to use WSUS to deploy patches
"Let WSUS Ease Your Patch-Deployment Hassles"


For details about installing and using the Office Update Inventory Tool
"Office Update Inventory Tool 2.1 Checks Installations for Updated Status"


For Schtasks examples and detailed syntax information
"Schtasks"


To download the Office Update Inventory Tool
"Microsoft Office 2003 Resource Kit Downloads"


Top Viewed ArticlesView all articles
The iPhone as a Mail Device

An Exchange administrator and self-proclaimed "Windows Mobile device wrangler" gives you the scoop on how well the iPhone 3G works for enterprise email, and points out some surprising omissions in Apple's latest release. ...

WinInfo Short Takes: Week of July 21, 2008

An often irreverent look at some of the week's other news, including an iPhone 3G defeat, 180 million copies of Windows Vista in the wild, Microsoft earnings some more Yahoo silliness, Wii vs. Xbox 360, EU vs. Intel, AMD ousts its CEO, and so much more ...

Top Vista Tricks from the Vista Masters

Learn how to work around Windows Vista's User Account Control, create multiple GPOs, and use Task Manager smartly, with these 8 Vista tricks. ...


Windows OSs Whitepapers Replay for Exchange: Enterprise Protection and an Affordable Price

Are You Satisfied?

A Preliminary Look at Deployment Plans for Microsoft Windows Vista

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Shortcut Guide to SQL Server Infrastructure Optimization
With right tools and techniques, you can have a top-performing SQL Server infrastructure without having to cram your data centers so that they're overflowing. Download this eBook to learn how.

WinConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

Become a fan of Windows IT Pro on Facebook!
Join us on Facebook and be a fan of Windows IT Pro!

Continuous Data Protection and Recovery for Exchange
Read this white paper to learn about Continuous Data Protection (CDP), Exchange 2007's local continuous replication and cluster continuous replication features.

Rev Up Your IT Know-How with Our Recharged Magazine!
The improved Windows IT Pro provides trusted IT content with an enhanced new look and functionality! Get comprehensive coverage of industry topics, expert advice, and real-world solutions—PLUS access to over 10,000 articles online. Order today!

Tips to Managing Messaging
Discover three fundamental mail and messaging management services - security, availability and control services - and how you can implement them in a Microsoft-centric mail and messaging environment.

Get It All with Windows IT Pro VIP
Stock your IT toolbox with every solution ever printed in Windows IT Pro and SQL Server Magazine plus bonus Web-exclusive content on hot topics. Subscribe to receive the VIP CD and a subscription to your choice of Windows IT Pro or SQL Server Magazine!



Drag & Drop Data Mapping Tool
Try this award-winning data mapping, & transformation tool that supports multiple databases, flat files, Web services, EDI, Excel 2007, & more! Free trial for 30 days!

Overcome bloated Windows file systems
Crossroads FMA delivers powerful yet inexpensive data migration

Bandwidth Monitoring Tool from SolarWinds
Identify largest bandwidth users in seconds. Get the free download now.

Speed Deployment of Vista and Microsoft Office
Read this white paper to learn how you can maximize your Vista and Office investments while lowering costs and increasing efficiency.

Integrated Virtualization Done Right
Download this white paper on server virtualization to begin improving resource utilization and lowering operating costs.

Order Your Fundamentals CD Today!
Gain an introduction to Exchange, learn server security requirements, and understand how unified communications can play a role in your messaging strategies with this free Exchange CD.

KVM over IP Solutions
Learn about a KVM over IP solution that is specifically designed to meet the needs of the distributed IT environment.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound
IT Library Technical Resources Directory Connected Home Windows Excavator SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing