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

How to Capture a Print Driver with SWV and SWS?

Created: 19 Aug 2010 • Updated: 04 Nov 2010 | 6 comments
Language Translations
Mike Hurst's picture
+6 6 Votes
Login to vote

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.)

 

Comments 6 CommentsJump to latest comment

Scot Curry's picture

Thanks for posting this.

0
Login to vote
zzpack's picture

Thanks for this nice post!

0
Login to vote
Bob Saetham's picture

Mike - Thank you for this guide.  I found it easy to follow and helpful.

0
Login to vote
Palvaran's picture

This is a pretty amazing idea as we currently use group policy to push out printers, but the idea of streaming printers is a bit more appealling to me.  This brings up another idea though.  What about scanners?  Given that a scanner driver could probably be pushed out much in the same way, what service would need to be restarted rather than spoolsv?

Systems Administrator
Rice University

Remember, "The happiness of your life, depends on the quality of your thoughts."

0
Login to vote
Dan Vicente's picture

I know this was some time ago. But the part where you add OnPostActivate and OnPostDeactivate, does this have to be done on every machine? It doesn't seem to be included in the Layer.

0
Login to vote
Anders Haga's picture

You only do this on the machine where you're making the package. Open the XPF file with composer and check "Event" -> "Post Activate" and "Post Deactivate", if you did everything correctly they'll be there.

0
Login to vote