Microsoft printers and scripting

twodogs62twodogs62 Member Posts: 393 ■■■□□□□□□□
I am in need of a script that would install a ms printer locally but globally for all users of each workstation.

does anyone have a script they could share to get me started?

thanks

Comments

  • Mr.NetworkMr.Network Member Posts: 117
    Are you using a MS domain? If so i would recommend group policy for adding the printer and stick it to a OU.
    CCNA R&S, MCSA.
  • gespensterngespenstern Member Posts: 1,243 ■■■■■■■■□□
    Printui.dll is your friend here. Here's what I've written back in the days. Works in startup scripts. Replace with your own stuff printer/drivers names.

    rundll32 printui.dll,PrintUIEntry /Xg /n"Canon iR2018 UFRII dLT" /q /f"%temp%\results.txt"

    reg export "HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers\Canon iR2018 UFRII LT" %temp%\canon.reg /y
    if %errorlevel% == 0 goto end

    if %processor_architecture% == AMD64 goto amd-64

    regedit /S \\servergw\distr\prn-deploy\port.reg
    net stop spooler
    net start spooler
    rundll32 printui.dll,PrintUIEntry /if /b "Canon iR2018 UFRII LT" /f "\\servergw\distr\driver\CNLB0R.inf" /r "IP_192.168.0.76" /m "Canon iR2018 UFRII LT" /z /u /q

    goto end

    :amd-64

    regedit /S \\servergw\distr\prn-deploy\vista-7.reg
    net stop spooler
    net start spooler
    rundll32 printui.dll,PrintUIEntry /if /b "Canon iR2018 UFRII LT" /f "\\servergw\distr\x64\driver\CNLB0RA64.inf" /r "192.168.0.76" /m "Canon iR2018 UFRII LT" /z /u /q

    :end

    Here is description in Russian, translate using google if it's unclear what script does.

    leo_sosnine:
Sign In or Register to comment.