6 Replies Latest reply on Feb 5, 2016 2:54 PM by Zhiyong Tian

    Deploying Pharos printer using group policy

    Veronica Thompson Newbie

      Hello All,

       

      Is it possible to deploy a Pharos printer queue to a computer, say in a computer lab environment, using group policy? We've always deployed our different lab printer packages on our computer lab image loads, but a question came up as to whether or not we could push the printer queues using group policy? We tried some testing and it looks like it somewhat works, however, for our printer queues where we needed the popup box to appear, it wouldn't work for those. Has anyone has any success with doing something like this on their campus or at their place of business? We've just recently upgraded to Pharos v9.

       

      Thanks!

      ~Veronica Thompson

        • Re: Deploying Pharos printer using group policy
          Scott Olswold Guide

          Veronica,

           

          As you've found, deploying the queue via GPO works, but you will be restricted to only using those queues that do not require Pharos Popup. However, you can also deploy Pharos Popup packages as a GPO, you just have to wrap their execution in a VBScript. To do so with no user interaction, specify the "-quiet" switch in the VBScript execution line.

           

          -Scott

            • Re: Deploying Pharos printer using group policy
              Mike Dorris Tracker

              Scott,

                I searched but couldn't find anything.   Is there official documentation on this?

                • Re: Deploying Pharos printer using group policy
                  Scott Olswold Guide

                  Mike,

                   

                  Nothing official. My preference is to wrap the install within VBScript, because that is something that can be pushed via GPO. A "shell" of a script is something like this:

                   

                  set objShell=wscript.createObject("wscript.shell")

                  ObjShell.Run("cmd.exe /c \\servername\sharename\PharosPackageName.exe -quiet")

                  wscript.quit

                   

                  To ensure that you're not constantly re-running the install, I like to put in a bit that says "I've been here" already, and use that as a checker:

                   

                  Set objFSO = CreateObject("Scripting.FileSystemObject")

                  If objFSO.FileExists("C:\InstallLog\PharosPackageName.txt") Then

                  wscript.Echo "Package already installed."

                  Else

                    Dim fso, InstallFile

                    Set fso = CreateObject("Scripting.FileSystemObject")

                    Set InstallFile = fso.CreateTextFile("C:\InstallLog\PharosPackageName.txt", True)

                    InstallFile.WriteLine("PackageName has been installed.")

                    InstallFile.Close

                  End If

                   

                   

                  So wrapping it all together gives us:

                   

                  Set objFSO = CreateObject("Scripting.FileSystemObject")
                  If objFSO.FileExists("C:\InstallLog\PharosPackageName.txt") Then
                    wscript.Echo "Package already installed."
                  Else
                    Dim fso, InstallFile
                    Set fso = CreateObject("Scripting.FileSystemObject")
                    Set InstallFile = fso.CreateTextFile("C:\InstallLog\PharosPackageName.txt", True)
                    InstallFile.WriteLine("PackageName has been installed.")
                    InstallFile.Close
                  set objShell=wscript.createObject("wscript.shell")
                  ObjShell.Run("cmd.exe /c \\servername\sharename\PharosPackageName.exe -quiet")
                  End If
                  

                   

                  You can get really fancy, and even get rid of wscript.Echo and do something else. It's VBScript. Have fun with it.

                   

                  Scott

                  2 of 2 people found this helpful
              • Re: Deploying Pharos printer using group policy
                Zhiyong Tian Adventurer

                And set a default printer after printer(s) get installed:

                 

                'Begin

                  Set PrtNetwork = WScript.CreateObject("Wscript.Network")

                  Set CurrentPrinters = PrtNetwork.EnumPrinterConnections

                    PrtNetwork.SetDefaultPrinter "Workstation Display Name"

                'End

                2 of 2 people found this helpful