Jordan has an excellent article on describing the history and options when capturing a print driver in SWV. This information is frequently requested by new and existing customers of Symantec Workspace Virtualization (SWV) and Streaming(SWS). I decided to create a new article to update some steps in his article, and provide an overall step-by-step process on capturing “any” type of print driver with SWV. I’ve also included a sample script to restart the print spooler service, and show you how to additionally stream the layer using SWS. The following article shows a capture of an Adobe PDF print driver, but this applies to any print driver.
Step 1 Creating an “Empty Layer” in the SWV Admin Tool.
1. Launch SWV Admin, Select the File Menu, then “New Layer
2. Select the radio button for Empty Layer
3. Layer name should be the product that you are capturing.
Step 2 Modify your layer properties
1. Modify your layer and select the “Autorun Applications” tab
2. Create a new” Autorun Entry”- Application path = C:\Windows\System32\spoolsv.exe. This is an import part of the process, so SWV will monitor this external process to capture the printer driver.
3. Close the layer properties window
4. Now right click on you layer and choose to activate. This is an important part of the capture process. This will make sure the print driver will be captured.
5. Now bring up a command prompt and run: net stop spooler. This will allow you to deactivate your layer since it’s now tied to this process.
6. Deactivate your layer
Step 3 Capturing your application
1. Now right click on the layer and choose “Add to layer”. Point to your application setup and select finish. Important!! Once the setup starts, from the command prompt run..
net start spooler. This is necessary, if you start before the capture, the layer will go into an activated state preventing you from adding to the layer.
2. Continue capturing your application, adding patches, etc.
1. Once the capture is complete. From a command prompt, run net stop spooler
2. Deactivate your layer
3. Now modify the layer and remove the “autorun entry”
Step 4 Create a script to restart the print spooler service.
1. The following script is an example but you can use whatever method you want to restart the service. The important part is that the event occurs on layer post activate and post deactivate.
2. Create a CycleSpooler.vbs script with the following
-------Cut and paste between these lines-------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service where Name='spooler'")
For each objService in colServiceList
objService.StopService()
Next
For each objService in colServiceList
errReturn = objService.StartService()
Next
-------Cut and paste between these lines-------
3. Open up the properties of your layer. Drag and drop the CycleSpooler.vbs script into the System\Meta directory under the Read-Only portion of your layer.
4. Close the properties windows
5. In the SWV Admin tool, select the View Menu and switch to details.
6. Locate the RO sublayer info
7. Open Regedit and navigate to following path.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FSLX\Parameters\FSL\”Your RO Sublayer info”
8. Add two multi-string values
OnPostActivate
OnPostDeactivate
9. Edit the Multi-String Values and add the following command to each
c:\windows\system32\wscript.exe %VZ_LAYER_METADIR%\CycleSpooler.vbs
Step 5 Testing your layer, and choosing your distribution method.
1. Now test your layer by activating and deactivating the layer. What should happen if everything has been configured correctly? The print spooler should stop and start at each activation and deactivation. The print driver should appear at activation, disappear at deactivation.
2. Once you have successfully tested your layer. Export the layer.
3. Once exported, it’s now ready to be distributed through any push technology, Symantec Client Management Suite, etc. If you want to stream your package it only requires a couple additional steps.
4. Open Symantec Wise Virtual Composer, select “Edit Package” on the Home Screen. Select your recently exported layer, and then name your package directory.
5. Once imported, you can make modifications to the supported operating systems and such, but otherwise you just need to select “Compile” on the last step. This compiled package can be distributed via Symantec Workspace Streaming or any other method (push, standalone, etc.)