Add windows printer without user input in login script

I am running the below script on a domain.  Users that do not already have the printer driver installed are prompted with a windows notification/warning about downloading the printer driver.  Is there a way to make this seemless so the user is not prompted when the script runs during login?

It seems to only occur when driver is intalled the first time or when it is changed.
sub AddPrinter(strPrinterUNC)
     ' Connecte to the network printer
     ' e.g. : call AddPrinter ("\\PrintServer\FinanceCopy")

     on error resume next
     objNetwork.AddWindowsPrinterConnection strPrinterUNC
     If Err.Number = 0 Then
           WriteLog(" Success: Connect to printer: " & strPrinterUNC)
       else
           WriteLog(" Failed:  Connect to printer: " & strPrinterUNC)
     end if
     on error goto 0
end sub

Open in new window

flg8tor96Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
exx1976Connect With a Mentor Commented:
There are many ways to make that not pop up, but I don't think you'll like any of my ideas..

Use a driver that's built-in to the OS.  HP LJ4 drivers can run nearly any B&W laser on the planet, and they're very stable, and have been built-in to Microsoft OSes since like 95 or 98.

Make the driver install part of your base install for all machines on the network.

Deal with end-user complaints the very first time the printer is installed, it'll eventually go away after the printer gets installed everywhere.

There's likely many more, but those are the best ones I've got..


-exx
0
 
flg8tor96Author Commented:
thanks for your help and reply to my question.
0
All Courses

From novice to tech pro — start learning today.