→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mzipperer
Engaged Sweeper III
Im looking for the ability to remotly manage printers including install and uninstall.
3 REPLIES 3
Esben_D
Lansweeper Employee
Lansweeper Employee
FYI driver scanning has now been added to Lansweeper: https://www.lansweeper.com/updates/introducing-lansweepers-2022-spring-launch-aymon/#h-windows-driver-scanning
mzipperer
Engaged Sweeper III
Thank you for the reply but I was mainly trying to get the Print Management tool to run through Lansweeper like the Services tool dose so I can use that instead of telling my techs to use that locally and have them go through the process of connecting to that computer though Print Management.
CyberCitizen
Honored Sweeper
Are you talking print servers or wanting to install printers on machines remotely.

In our main office buildings we have a print server, however we are a construction company and have a lot of smaller sites that don't have a printer server so in those cases we deploy the print drivers and print queue to the machines on those sites. You do have to package it up as a deployment though. Which means you need to export the print drivers, sometimes certificates and install the printers. Below is an example of one of our sites which has 3x machines so instead of a separate print package they were bundled together for this site.

So first step I do is attempt to uninstall the printer that I am installing the reason for that is Lansweeper will sometimes double install printers and you end up with Printer, Printer (1), Printer (2), etc. This just prevent the duplicate print queue names.

Next step is to import the printers certificate, otherwise it won't install via command line as Windows will throw up a do you want to install this print driver message requiring admin rights to install.

Next we create the IP port that the printer will be using.

We then install the print drivers and set the printer name & create the queue.

Finally we apply custom print settings eg A4 Single B&W vs A4 Double Sided and Colour.

To set these defaults install the printer on your machine, set the printer defaults then export the defaults using this command line string.

rundll32 printui.dll,PrintUIEntry /Ss /n "SITE.NAME (SC2020)" /a "\\SERVERNAME\Apps$\Printer Drivers\Multi Printer Sites\Printer Settings (Defaults)\SITE.NAME (SC2020).Settings.dat"


It does look like a bit of work, but once you have a template setup it doesn't take that long and for us it works really well as we have something like 30 projects sites on the go and each project site will have something like 20-40 staff float through, so instead of having to manually install the printers on each users machine (which is what the old IT used to do) or use a print server via VPN back to the head office (massive network strain and print delays), this works well.

:Uninstall Existing Printers / Names
rundll32 printui.dll,PrintUIEntry /q /dl /n "SITE.NAME (SC2020)"
rundll32 printui.dll,PrintUIEntry /q /dl /n "SITE.NAME (Ineo 368) MFD1"
rundll32 printui.dll,PrintUIEntry /q /dl /n "SITE.NAME (Ineo 368) MFD2"


:Import FujiXerox Certificate
certutil -addstore "TrustedPublisher" "\\SERVERNAME\Apps$\Printer Drivers\FujiXerox.cer"
certutil -addstore "TrustedPublisher" "\\SERVERNAME\Apps$\Printer Drivers\KonicaMinolta.cer"


:Create TCP/IP Ports - SITE.NAME (SC2020)
CSCRIPT /nologo %windir%\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r 10.40.11.10 -o raw -n 9100 -h 10.40.11.10
:Create TCP/IP Ports - SITE.NAME (Ineo 368) MFD1
CSCRIPT /nologo %windir%\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r 10.40.11.11 -o raw -n 9100 -h 10.40.11.11
:Create TCP/IP Ports - SITE.NAME (Ineo 368) MFD2
CSCRIPT /nologo %windir%\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r 10.40.11.12 -o raw -n 9100 -h 10.40.11.12


:Install Printer - SITE.NAME (SC2020)
rundll32 printui.dll,PrintUIEntry /q /if /n "SITE.NAME (SC2020)" /b "SITE.NAME (SC2020)" /f "\\SERVERNAME\Apps$\Printer Drivers\Fuji Xerox SC2020\XR6IKAL.inf" /r "10.40.11.10" /m "Xerox DocuCentre SC2020 PCL 6"
:Install Printer - SITE.NAME (Ineo 368) MFD1
rundll32 printui.dll,PrintUIEntry /q /if /n "SITE.NAME (Ineo 368) MFD1" /b "SITE.NAME (Ineo 368) MFD1" /f "\\SERVERNAME\Apps$\Printer Drivers\Multi Printer Sites\Konica BizHub C368\KOAXPJ__.INF" /r "10.40.11.11" /m "KONICA MINOLTA C368SeriesPCL"
:Install Printer - SITE.NAME (Ineo 368) MFD2
rundll32 printui.dll,PrintUIEntry /q /if /n "SITE.NAME (Ineo 368) MFD2" /b "SITE.NAME (Ineo 368) MFD2" /f "\\SERVERNAME\Apps$\Printer Drivers\Multi Printer Sites\Konica BizHub C368\KOAXPJ__.INF" /r "10.40.11.12" /m "KONICA MINOLTA C368SeriesPCL"


:Install Printer Configuration Settings
rundll32 printui.dll,PrintUIEntry /Sr /n "SITE.NAME (SC2020)" /a "\\SERVERNAME\Apps$\Printer Drivers\Multi Printer Sites\Printer Settings (Defaults)\SITE.NAME (SC2020).Settings.dat" d g r
rundll32 printui.dll,PrintUIEntry /Sr /n "SITE.NAME (Ineo 368) MFD1" /a "\\SERVERNAME\Apps$\Printer Drivers\Multi Printer Sites\Printer Settings (Defaults)\SITE.NAME (Ineo 368) MFD1.Settings.dat" d g r
rundll32 printui.dll,PrintUIEntry /Sr /n "SITE.NAME (Ineo 368) MFD2" /a "\\SERVERNAME\Apps$\Printer Drivers\Multi Printer Sites\Printer Settings (Defaults)\SITE.NAME (Ineo 368) MFD2.Settings.dat" d g r