Login to participate
Endpoint Management & Virtualization BlogsRSS

Creating Printers in SVS Layers (e.g. Adobe PDF Printer)

Adam Hall's picture

If you need to create a printer as part of an SVS Layer, you need to restart the Print Spooler service after the layer is activated.

I included a script in the Adobe Acrobat Professional layer I created, with a shortcut to this script in the StartUp folder. The layer activates, and runs the script (as it is in the startup folder) which restarts the Print Spooler service and makes the printer available.

My script is embarrassingly simple :) I'm sure this could be written in WMI or VBS to be invisible to the user.

@echo off
TITLE Adobe PDF Printer Creation
echo Creating Adobe PDF Printer ...
net stop "Print Spooler" >NUL
net start "Print Spooler" >NUL

Then I created a link to this batch file, put it in the CommonStartUp folder, and set it to run minimized.

Notes: Users may need elevated privileges to stop and start a service.

A Global capture is required to grab the printer, as it is created outside of the setup.exe from Adobe.

Scott Jones's picture

Only for initial activation

Just a note that this is only required for the initial activation. If the VSP is flagged to start automatically, on bootup printers will be available and load normally.

Then again, keep in mind that -- except for the Adobe PDF Writer -- printer drivers are not officially supported in a layer in SVS 2.0. Often, they'll work just fine, but we don't guarantee it.

Scott Jones
Product Manager
Altiris, Inc.

Scott Hardie's picture

VBS Script to Stop, Start, Restart Print Spooler Service

strComputer = "." '
strSvcName = "Spooler" '
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set objService = objWMI.Get("Win32_Service.Name='" & strSvcName & "'")
intRC = objService.StopService
WScript.Sleep 10000 ' Each 1000 = 1 second
intRC = objService.StartService

James "Scott" Hardie
Vice President of Technology Services
shardie@xcendgroup.com
http://www.xcendgroup.com

James "Scott" Hardie
Manager Systems Engineering
scott_hardie@symantec.com
http://www.symantec.com

bsuggs's picture

Start\Stop Spooler on Activate

The following registry keys will stop\start the spooler service after activation and deactivation.

POSTACTIVATE
[HKEY_LOCAL_MACHINE\SYSTEM\Altiris\FSL\Layer#\Services\PostActivate]
@=""

[HKEY_LOCAL_MACHINE\SYSTEM\Altiris\FSL\Layer#\Services\PostActivate\Sequence#]
"ServiceName"="spooler"
"Command"=dword:00000003

[HKEY_LOCAL_MACHINE\SYSTEM\Altiris\FSL\Layer#\Services\PostActivate\Sequence#]
"ServiceName"="spooler"
"Command"=dword:00000002

POSTDEACTIVATE
[HKEY_LOCAL_MACHINE\SYSTEM\Altiris\FSL\Layer#\Services\PostDeactivate]
@=""

[HKEY_LOCAL_MACHINE\SYSTEM\Altiris\FSL\Layer#\Services\PostDeactivate\Sequence#]
"ServiceName"="spooler"
"Command"=dword:00000003

[HKEY_LOCAL_MACHINE\SYSTEM\Altiris\FSL\Layer#\Services\PostDeactivate\Sequence#]
"ServiceName"="spooler"
"Command"=dword:00000002

 
Andrew Souter's picture

Adobe acrobat

So will SVS capture the Acrobat install with the pdf printer installed; meaning you can open a Word doc and print to pdf through the SVS layer?

bsuggs's picture

Correct

I was able to capture Acrobat in Adobe Creative suite without issues.

I had to capture it using a global capture. A single .exe capture does not pick up everything.

erikw's picture

Adobe capture

I captured Adobe with a DOS box.

Capture program is cmd.exe.

Everything you'll strat in the DOS box will be captured. Works great.

Before Frankb posted the multicapture tool I also used this to install more apps in one layer.

regards
erik

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