Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Symantec Workspace Virtualization - Packaging Best Practices, Part 2

Created: 14 Dec 2010 • Updated: 14 Dec 2010 | 4 comments
Language Translations
Scot Curry's picture
+6 6 Votes
Login to vote

Introduction

In the first part of this article I discussed setting up the environment requirements for creating layers, and talked about our new package creation tool Wise Virtual Composer. In this part of the article we are going to dig into the actual tips and tricks of creating packages.

Special Packaging Considerations

Special Packaging Considerations

Use CMD.EXE as the Primary Application to Capture Applications

One of the best tips I can give is to use %SystemRoot%\System32\Cmd.exe as your primary capture application. This will open command prompt. You can the navigate to your installer, or run MSIEXEC.EXE from the command prompt with the appropriate command line options to install your application.

The real benefit of using CMD.EXE as the primary capture is that you then have the ability to customize the application before terminating the capture process. The example that I give customers is the capture of Java. I run the installer then navigate to %SystemRoot%\System32 and run the Java control panel applet (jpicpl32.cpl for some of the later versions) to turn off updates. Once you have made all of the changes you require to the application, you just type exit at the command prompt and the capture will be complete.

Using CMD.EXE also allows you to chain applications if that is required. You would just run each application in sequence from the command prompt and exit the command prompt when you have completed the final installation.

Packaging Applications that Require a Reboot

The addition of Wise Virtual Composer has not changed the fact that Workspace Virtualization still does not use snapshot technology for application capture, which means that the capture will end as soon as the machine starts the reboot process.

It is important to note the reasons that application installations require reboots. There are three primary reasons that applications require reboots.

  1. The installation is attempting to overwrite an in use file.
  2. The installation has installed a service or driver that will be started when the machine is rebooted.
  3. The application has added information to the registry that will fire off a post installation configuration process.

Due to the redirection of the files by the Workspace Virtualization filter driver, there is no chance that an installation would ever attempt to overwrite an in-use file, so that installation would never require a reboot.

Installation will often require a reboot to insure that any new drivers or services that it added are recognized by the system. During the layer creation process drivers and services will be captured into the Workspace Virtualization layer. Workspace Virtualization attempts to start all services and drivers upon machine startup if the layer has been set to Start Layer Automatically (which if you have used the Wise Virtual Composer will be set by the default template). These applications will have their drivers and services started correctly and will not need any special consideration during the layer creation and packaging process. (Workspace Virtualization spins up services, etc. during activation even if the layer is not set to start automatically.)

The one area where special consideration need to be taken into account when creating Workspace Virtualization packages are application that create registry entries or Startup Menu options that perform post installation configuration steps. Search the following areas of the layer for any information that was added by the installation:

  • HKLM\Software\Microsoft\Windows\CurrentVersion\Run
  • HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
  • HKCU\Software\Microsoft\Windows\CurrentVersion\Run
  • HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce
  • %SystemDrive%\Documents and Settings\USERPROFILE\Start Menu\Programs\Startup - XP
  • %SystemDrive%\Documents and Settings\ALL USERS\Start Menu\Programs\Startup - XP
  • %APPDATA%\Microsoft\Windows\Start Menu\Programs\StartUp - Windows 7
  • %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\StartUp - Windows 7

If there are entries in these locations make note of what they command are. This is another reason to use CMD.EXE as the primary capture application. If you find an entry in any of the above values, you can copy the command and run it from the command prompt, prior to exiting the capture.

Packaging Applications that have Dependencies

A good follow-up topic to using CMD.EXE is applications that have dependencies. One way you could capture the dependency and the application in the same layer. An example being the .NET Framework and an application that requires the .NET Framework.

There may be times where you want to separate the application from the dependency. In this case the packaging process will take a couple of extra steps. The first step will be to capture the dependency into a layer. Because you don't want the dependency to be part of the layer you will then revert the machine to your clean snapshot.

You will then need to physically install the dependency on the machine prior to running the capture process for the application. Workspace Virtualization does not allow for the capture of an application while another virtual layer is active.

Once you have capture the application, you should import the dependent layer created in first step and set the dependency using the SWV Admin tool prior to compiling the package.

Disabling Advertised Shortcuts for Windows Installer Packages

Advertised shortcuts are the shortcuts that cause the Windows Installer service to confirm that all of the key path components are correctly installed and if they are not, it will attempt to reinstall the components from the source installation. It is a best practice to install all of the features and components that the Workspace Virtualization layer may need during execution. While the Windows Installer repair functionality works with Workspace Virtualization it is written to the writeable sublayer and will be removed if the layer is ever reset.

To disable advertised shortcuts use the DISABLEADVTSHORTCUTS=1 command as a parameter in the MSIEXEC command line.

Applications That Install Drivers

This section highlights one of the great new feature that was released as part of Workspace Virtualization 6.1, the ability to capture drivers without using Global Capture. Jordan Sanderson has written a great article about the concept of virtualizing a printer driver, and Mike Hurst has written a great article about the actual implementation of capturing a printer driver. Once you understand the concept handling process that are running when the capture starts, you will be able to capture a number of drivers.

Conclusion

We are constantly striving to make the packaging process. This document covers some of the new features that have been added to the Workspace Virtualization product.

Comments 4 CommentsJump to latest comment

achojwa's picture

Hi Scot, talkink about post processing, I'd like you to deepen also the one that is performed by windows by means of the "HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations" value. This value is used by Windows to perform blocked file management after reboot.

We find (too late...) several situations (i.e. Project 2007, IE6, Acrobat Professional 8, MS SQL 2005 Client) where this value is valorized and since this has a quite obscure syntax, I'd like to know from you how to manage such situations.

We u   usususe Use CMD.EXE as the Primary Application to Capture Applications.

 

thank you

 

Antonio

0
Login to vote
michael cole's picture

I thought these were great but always felt like there was more that could have been said. One of the biggest gaps in this is a chapter on how to clean up virtual packages after creating by removing unwanted fluff. There are plenty of references elsewhere about what to remove but nothing concrete put together. For example it has been mentioned about removing windows installer information...but what parts? I appreciate that advice will vary from application to applcation and never should replace good windows knowledge but I can't help feeling like i want more!

Michael Cole

Principal Business Critical Engineer

Business Critical Services

0
Login to vote
erikw's picture

Michael,

Writing an article on how to clean out is something that is on my mind for years now, but there is a big problem with that. What I clean in one layer should stay in another depending various settings, registry key's etc.

For instance Office, cleaning out the installer information makes the package useless, where in Visio it is a good way to reduce the size tremendously.

I can not think of a generic way to do this.

In courses i give this is alway's the difficult part. It's like riding a big. You have to learn it.

Sorry

Regards Erik www.DinamiQs.com Dinamiqs is the home of VirtualStorm (www.virtualstorm.org)

*************************************************************
If your issue has been solved, Please mark it as solved
***********

+1
Login to vote