6 Replies Latest reply on Nov 22, 2011 10:13 AM by WiseGuy

    Batch file that add printer doent set the pirnter as default

    Apprentice

      I have this bacth file that run ok locally but when i run this as a package (Batch) it cannot set this printer as default printer.

      this is a network printer.

      winXP

       

      cscript %WINDIR%\system32\Prnport.vbs -a -r IP_10.25.1.10 -h 10.25.1.10 -o lpr -q LPTPASSTHRU
      rundll32 printui.dll,PrintUIEntry /u /y /if /b "CMS-122-HPCLJ2600" /f %windir%\inf\ntprint.inf /r "IP_10.25.1.10" /m "HP Laserjet 2100 PCL6"
      cscript %WINDIR%\system32\prnmngr.vbs -t -p "CMS-122-HPCLJ2600"

       

       

      I use this too but it doenst work either.

       

      cscript %WINDIR%\system32\Prnport.vbs -a -r IP_10.25.1.10 -h 10.25.1.10 -o lpr -q LPTPASSTHRU
      cscript %WINDIR%\system32\prnmngr.vbs -a -p "CMS-122-HPCLJ2600" -m "HP Laserjet 2100 PCL6" -r IP_10.25.1.10
      cscript %WINDIR%\system32\prnmngr.vbs -t -p "CMS-122-HPCLJ2600"

       

      The last line is that make that printer as a default.

       

      If you have any clue i will really apreciatte it.

       

      Thank you.