• Home
  • Cisco
  • Exchange
  • Linux
  • Navision
  • Network
  • Virtualization
  • Windows
  • About
  •  

    Set standard printer with a script


    RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n “RICOH 3228C”

    If you need a delay og 10 sec, add this before:
    ping 1.1.1.1 -n 1 -w 10000 > nul

    —-
    Alternative:

    In bat file:
    cscript print.vbs

    In vbs file:
    Option Explicit
    On Error Resume Next
    Dim objNetwork
    Set objNetwork = CreateObject(“WScript.Network”)

    objNetwork.SetDefaultPrinter “printer MFP(PCL) (redirected 1)”
    objNetwork.SetDefaultPrinter “printer MFP(PCL) (redirected 2)”
    objNetwork.SetDefaultPrinter “\\server\printer”

    WScript.Quit

    Exit mobile version