Capturing Office 2007 or 2010 in Windows 7 or Vista

Article:DOC2125  |  Created: 2010-03-30  |  Updated: 2010-03-30  |  Article URL http://www.symantec.com/docs/DOC2125
Article Type
Documentation


Description



 The most common issue encountered when capturing Microsoft Office 2007 and 2010 is handling the dependency on the Microsoft Visual C++ 2005 runtime. During Office installation, if the Visual C++ 2005 rutime is not available on the computer, Office installs it.

For most applications, installing a dependency is not a problem. The dependency is captured to the layer with the application. With Office however, the installation uses transactions to install the Visual C++ 2005 runtime, which causes some of the installation data to be written to the base instead of to the layer.

The easiest way to resolve this issue is to distribute the Visual C++ 2005 runtime as part of your base image or through software distribution. This makes it available for Office and all other applications that use this runtime.

If that is not an option, it is possible to capture and deploy Office using Symantec Workspace Virtualization. Since everything is in the base after the installation, the layer will work properly when it is tested on the machine on which it was captured.  However, if the layer is migrated from one machine to another, the leaked items that were installed to the base rather than the layer (in this case, Microsoft Visual C++ 2005 Redistrutable's registry keys and SxS files) are not present within the layer.  Accordingly, Office runs a repair to reinstall all of the missing components.  Because this repair is also transcated, everything is again captured to the base, rather than the layer.

In order to successfully capture Office 2007 and avoid reoccuring repair installations, simply install Microsoft Visual C++ 2005 Runtime to the base before running the virtualizated application.  However, because Office expects Microsoft Visual C++ 2005 Redistributable version 8.0.50727.42 to be on the machine, that specific version will need to be installed in order for the capture to be completed properly.  More than one version of Visual Studio 2005 can be present simultaneously on a machine, and is it not backwards compatible (like .Net).  Checking for the presence of the correct version can be done via WMI by querying against the Win32_Product object like so:

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _

    & "{impersonationLevel=impersonate}!\\" _

    & strComputer & "\root\cimv2")

Set colSoftware = objWMIService.ExecQuery(_

    "Select * from Win32_Product " & _

    "Where Caption =" _

        & " 'Microsoft Visual C++ 2005 Redistributable' AND Version="_

& " '8.0.50727.42' ")

For Each objItem in colSoftware

    Wscript.Echo "Name: " & objItem.Name

    Wscript.Echo "Version: " & objItem.Version

Next

The correct version of Microsoft Visual C++ 2005 Redistributable can be downloaded directly from Microsoft at the following link:

http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en

The installer needs to be version 6.0.2900.2180.  Once installed, you can check in the Control Panel to ensure that the correct version of Microsoft Visual C++ 2005 Redistributable (version 8.0.50727.42) has been installed.

Like Office 2007, Office 2010 also requires MIcrosoft Visual C++ Runtimes, although it requires different version.  Visual C++ 2008 SP1 Runtime (version 9.0.30729) is required.  Checking for the presence of the correct version can also be done via WMI by querying against the Win32_Product object using a slightly different script:

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _

    & "{impersonationLevel=impersonate}!\\" _

    & strComputer & "\root\cimv2")

Set colSoftware = objWMIService.ExecQuery(_

    "Select * from Win32_Product " & _

    "Where Caption =" _

        & " 'Microsoft Visual C++ 2008 Redistributable – x86 9.0.30729.17' AND Version="_

& " 9.0.30726' ")

For Each objItem in colSoftware

    Wscript.Echo "Name: " & objItem.Name

    Wscript.Echo "Version: " & objItem.Version

Next

The correct version of Microsoft Visual C++ 2008 Redistributable can be downloaded directly from Microsoft at the following link:

http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en

The installer needs to be version 9.0.30729.17.  Once installed, you can check in the Control Panel to ensure that the correct version of MIcrosoft Visual C++ 2008 -x86 Redistributable (9.0.30729) was installed.

In summary, best practice for capturing Office 2007 or 2010 is to first have Microsoft Visual C++ installed into the base, as opposed to being captured in the layer, prior to capturing Office.  You can capture using the above method without the required Microsoft Visual C++ Redistributable in the base, as long as it is installed on the client machine before Office is run.  This is because the layer will see what is in the layer before it sees what is in the base.  Accordingly, if you have Microsoft Visual C++ Redistributable DLLs in your layer and the base and an update for Microsoft Visual C++ Redistributable that Office requires is released and it is installed to the base, Office will still see the old DLLs that are present in the layer.

If capturing Office 2007 SP2 or above, you will need to first install version 8.0.50727.42, as well as version 8.0.50727.762, which is SP1 of the Microsoft Visual C++ 2005 Runtime.  That correct version of Microsoft Visual C++ 2005 Runtime can be downloaded directly from Microsoft at the following link:

http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en

The installed needs to be version 6.0.3790.0.  Once installed, you can check in the Control Panel to ensure that the correct version of Microsoft Visual C++ 2005 Redistributable (8.0.50727.762) was installed.

 

 


Legacy ID



52207


Article URL http://www.symantec.com/docs/DOC2125


Terms of use for this information are found in Legal Notices