Any suggestions? Export (0) Print
Expand All

Chain a Visual Basic script to copy Config.xml during a CacheOnly installation

Groove Server 2007

Updated: March 26, 2007

Applies To: Office Resource Kit


Topic Last Modified: 2007-03-22

Administrators can copy a customized Config.xml file into the Msocache subfolder during a CacheOnly installation to automate the process of installing a customized copy of the 2007 Microsoft Office system using the cached Setup files.

Administrators can chain a Visual Basic script in a CacheOnly installation to create the local installation source (LIS) that includes a copy of a custom Config.xml file. The custom Config.xml file is available when Setup is run from the LIS.

This topic includes an example of a Visual Basic script called copy_configxml.vbs and provides instructions for using the script.

By using a Visual Basic script, such as the one in the following example (copy_configxml.vbs) and the CacheOnly Config.xml settings file, you can install Office 2007 by running Setup.exe from the LIS file location. You do not have to specify a custom Config.xml file. The custom Config.xml file is automatically used, since it is in the same location as the Setup.exe file.

dim FileSys, CustConfigXml, WshShell

'*** Use this constant to specify the patch and file name of the custom settings file.
Const PathCustConfigXml = \\server\share\config.xml

'*** Use this constant to specify the GUID of the Office product being installed.
'*** Office 2007 Enterprise (Enterprise) GUID = {90120000-0030-0000-0000-0000000FF1CE}
'*** Office 2007 Professional (Enterprise) GUID = {90120000-0014-0000-0000-0000000FF1CE}
'*** Office 2007 Professional Plus (Enterprise) GUID = {90120000-0011-0000-0000-0000000FF1CE}
'*** Office 2007 Small Business (Enterprise) GUID = {90120000-00CA-0000-0000-0000000FF1CE}
'*** Office 2007 Standard (Enterprise) GUID = {90120000-0012-0000-0000-0000000FF1CE}
'*** See KB article 928516, "Description of numbering scheme for product code GUIDs in Office 2007" for additional information.
Const Guid = "{90120000-0011-0000-0000-0000000FF1CE}"

set FileSys = CreateObject ("Scripting.FileSystemObject")
set WshShell = WScript.CreateObject("WScript.Shell") 

'*** Specify the path and filename of the shared settings file that is to be copied.
set CustConfigXml = filesys.GetFile(PathCustConfigXml)

'*** Determine the product specific location that the settings file should be copied to. The GUID will vary by product.
MSOCacheFldr = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & Guid & "\InstallSource")

'*** Copy the shared settings file to the appropriate MSOCache subfolder.
CustConfigXml.copy MSOCacheFldr

For information about the numbering scheme for product code GUIDs in Office 2007, see KB article 928516, Description of the numbering scheme for product code GUIDs in 2007 Office suites and programs, on the Microsoft Help and Support Web site.

The following procedure explains how to use a Visual Basic script to copy Config.xml for a CacheOnly install.

To chain a Visual Basic script
  1. Share a copy of the customized Config.xml settings file that you want to copy to the local computer during the CacheOnly setup. For example, \\server\share\config.xml.

  2. Place the Visual Basic script file (copy_configxml.vbs in this example) in a network share folder.

  3. In the Config.xml file that defines the CacheOnly settings (for example, cacheonly_config.xml), modify the Path attribute of the Command element to include the path and file name of the Visual Basic script file (copy_configxml.vbs). To modify the Config.xml file, do the following:

    1. Open the Config.xml file in a text editor tool, such as Notepad. Locate the line that contains the Command element, shown in the following example:

      <!-- <Command Path="msiexec.exe" Args="/i \\server\share\my.msi" QuietArg="/q" ChainPosition="after" Execute="install" /> -->

    2. Modify the Command element entry with the path for the script you want to use. For example, use the following syntax to modify the Path attribute:

      <Command Path="%windir%\system32\wscript.exe" Args="<path>\filename.vbs" />

      where filename.vbs is copy_configxml.vbs in this example.

    For more information about the Command element in Config.xml, see Command in Config.xml file in the 2007 Office system.

  4. Install Office 2007 using the Config.xml file that contains the CacheOnly settings.

  5. After you complete the preceding steps, the installation files for Office 2007 are cached with the customized Config.xml settings file. Run the cached Setup.exe file to install Office using the settings that are contained in the customized Config.xml file.

© 2016 Microsoft