+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, Printer vbscript ? in Coding and Web Development; Kingswood had a vbscript that is simple yet effective with regards to adding a printer , setting it to default ...
  1. #1

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,813
    Thank Post
    3,330
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    Printer vbscript ?

    Kingswood had a vbscript that is simple yet effective with regards to adding a printer , setting it to default and it had a sleep time of aprox 1000 aka 1 second to give it a chance to add the connection or something like that, Any chance you or someone could post it

    Thanks and much appreicated !

  2. #2
    StewartKnight's Avatar
    Join Date
    Jun 2005
    Posts
    1,587
    Thank Post
    2
    Thanked 27 Times in 21 Posts
    Rep Power
    30

    Re: Printer vbscript ?

    this is the vbscript I use; hope it helps!!!

    Option Explicit
    Dim oNetwork, sPrintPath
    Set oNetwork = CreateObject("WScript.Network")

    sPrintPath ="\\192.168.2.250\Lexmark"
    oNetwork.AddWindowsPrinterConnection sPrintPath
    oNetwork.SetDefaultPrinter sPrintPath


    WScript.Quit


    Obviously I have the printer shared on the print server as "Lexmark"(don't ask!!!) and the print servers ip address. Run this at logon, and the printer will be the default

SHARE:
+ Post New Thread

Similar Threads

  1. VBScript / SQL Server
    By Gatt in forum Scripts
    Replies: 7
    Last Post: 23rd September 2011, 03:21 PM
  2. VBScript Error
    By sqdge in forum Scripts
    Replies: 20
    Last Post: 13th September 2007, 03:34 PM
  3. another VBScript question!
    By StewartKnight in forum Coding
    Replies: 4
    Last Post: 3rd May 2007, 05:41 PM
  4. VBScript
    By StewartKnight in forum Coding
    Replies: 5
    Last Post: 1st May 2007, 11:04 AM
  5. vbscript arguements ?
    By mac_shinobi in forum Scripts
    Replies: 1
    Last Post: 20th February 2007, 10:29 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •