Announcement

Collapse
No announcement yet.

Script to make local printer default?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script to make local printer default?

    Hi all

    Got a few users who have local printers (either USB or LPT1 and also have PrimoPDF (a free PDF print driver) but as they have madatory read only profiles when they log in the PDF print driver is the default printer and obviously when they change their local printer to default when they log off it reverts back to the PDF printer.

    Is there a way of making the local printer the default? I know it is nice and easy with network printers!!

    Thanks in advance
    Server 2000 MCP
    Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

  • #2
    Done it....
    Code:
    Set WshNetwork = WScript.CreateObject("WScript.Network") 
    PrinterPath = "Dell Laser Printer 1700n" 
    WshNetwork.SetDefaultPrinter PrinterPath
    Where printerpath is, this is the name of the printer (to get exact you can use prnmngr.vbs in c:\windows\system32 on XP with a -l on the end)

    Hope this helps anyone else who wants to do this.
    Server 2000 MCP
    Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

    Comment

    Working...
    X