Distributing Visual Studio C 2010 SP1 Libraries with ZENworks

0 Likes
Many applications require that the Visual Studio C 2010 SP1 libraries or other versions of these libraries be installed prior to installing them. To simplify management of these, I typically create standalone bundles that can be used in a dependency chain as needed. The principles used in this solution can be applied to other versions of the C runtimes, you just have to download the right version, and then change the requirements to check for the appropriate keys.

Visual C 2010 SP1 x86 Installer


The first bundle you need to create is the one that installs the Visual C 2010 SP1 x86 redistributable. This will be used by 32-bit applications that require the Visual Studio C libraries.

  1. Run the “vcredist_x86.exe –x” command. This should prompt you for a folder where you want to place the extracted contents of the executable package. Enter the path to an empty directory.

  • Create a new bundle that distributes the vc_red.msi.

    1. In ZCC, go to the Bundle page and browse to the folder you want to create the bundle in; then select New > Bundle…

  • Select Windows Bundle

  • Select MSI Application

  • In the name field enter Deploy Visual C 2010 x86 Libraries; then click Next.

  • Click the browse button next to Upload .msi for normal install.

  • Browse to the vc_red.msi and select Include all files in and below the directory of this file

  • When the files are finished uploading, click Next.

  • At the Select Command screen, click Next.

  • Select the option to Define additional details; then click Finish.



  • Add system requirements and impersonation settings to the action so that the MSI is only installed IF it is not already present on the device.

    1. Select the Actions tab.

  • Select the Install sub-tab.

  • Click the Install MSI action in the list.

  • Click the Advanced tab.

  • Select Run as secure system user.

  • Select the Requirements tab.

  • Select Architecture = 32

  • Click Add Filter

  • Select Registry Key and Value exists.

  • In the first text box enter HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86

  • In the second text box enter Installed

  • In the dropdown box select No.

  • Click Add Filter Set.

  • Select Architecture = 64

  • Click Add Filter

  • Select Registry Key and Value exists.

  • In the first text box enter HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x86

  • In the second text box enter Installed

  • In the dropdown box select No.

  • Click OK.

  • Click Apply to save the bundle.

  • You now have a bundle that will install the Visual C 2010 Runtime to any assigned machines.



  • Test the bundle by assigning the app to at least one 32-bit machine and one 64-bit machine and running it. Once you have verified success, publish the bundle.


Visual C 2010 SP1 x64 Installer


The second bundle you need to create is the one that installs the Visual C 2010 SP1 x64 redistributable. This may be required by 64-bit applications with a dependency on the Visual C 2010 libraries.

  1. Run the “vcredist_x64.exe –x” command. This should prompt you for a folder where you want to place the extracted contents of the executable package. Enter the path to an empty directory.

  • Create a new bundle that distributes the vc_red.msi.

    1. In ZCC, go to the Bundle page and browse to the folder you want to create the bundle in; then select New > Bundle…

  • Select Windows Bundle

  • Select MSI Application

  • In the name field enter Deploy Visual C 2010 x64 Libraries; then click Next.

  • Click the browse button next to Upload .msi for normal install.

  • Browse to the vc_red.msi and select Include all files in and below the directory of this file

  • When the files are finished uploading, click Next.

  • At the Select Command screen, click Next.

  • Select the option to Define additional details; then click Finish.



  • Add a bundle level system requirement so that the app will only install on a 64-bit OS.

    1. Select the Requirements tab.

  • Click Add Filter.

  • Select Architecture = 64.

  • Click Apply.



  • Add system requirements and impersonation settings to the action so that the MSI is only installed IF it is not already present on the device.

    1. Select the Actions tab.

  • Select the Install sub-tab.

  • Click the Install MSI action in the list.

  • Click the Advanced tab.

  • Select Run as secure system user.

  • Select the Requirements tab.

  • Select Architecture = 64

  • Click Add Filter

  • Select Registry Key and Value exists.

  • In the first text box enter HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x64

  • In the second text box enter Installed

  • In the dropdown box select No.

  • Click OK.

  • Click Apply to save the bundle.



  • Test the bundle by assigning the app to at least one 64-bit machine and running it. Once you have verified success, publish the bundle.


You now have a bundle that will install the Visual C 2010 Runtime to any assigned machines. These bundles are also available for subscription from the ZENguru zone. For more information about how to subscribe please refer to this solution.

Labels:

How To-Best Practice
Comment List
Related
Recommended