+ Post New Thread
Results 1 to 3 of 3
Coding Thread, Arrrghhh HELP! in Coding and Web Development; Can anyone please tell me what's wrong with this. ' VBScript. Dim net Set net = CreateObject("WScript.Network") net.AddWindowsPrinterConnection "\server\ICTSUITECOL" net.AddWindowsPrinterConnection ...
  1. #1
    chalkwellstu's Avatar
    Join Date
    Sep 2007
    Location
    Leigh on Sea
    Posts
    148
    Thank Post
    5
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Arrrghhh HELP!

    Can anyone please tell me what's wrong with this.

    ' VBScript.

    Dim net
    Set net = CreateObject("WScript.Network")

    net.AddWindowsPrinterConnection "\\server\ICTSUITECOL"

    net.AddWindowsPrinterConnection "\\server\ICTSuiteBW"

    net.SetDefaultPrinter "\\server\ICTSuiteBW"

    net.AddWindowsPrinterConnection "\\server\UPWEST"


    i know jack about VBS and this script was written by my predecessor. as far as i can make out it's never worked. it sits in GPO under 'scripts to run at logon' see below for the error message.

    its doing my head in!!!

  2. #2
    ICT_GUY's Avatar
    Join Date
    Feb 2007
    Location
    Weymouth
    Posts
    2,269
    Thank Post
    683
    Thanked 283 Times in 204 Posts
    Rep Power
    106
    'add a printer but do not make it the default.

    Set wshNetwork = CreateObject("WScript.Network")
    wshNetwork.AddWindowsPrinterConnection "\\servername\printername"

    'add another printerand make it the default.

    wshNetwork.AddWindowsPrinterConnection "\\servername\printername"
    wshNetWork.SetDefaultPrinter "\\servername\printername"

  3. Thanks to ICT_GUY from:

    chalkwellstu (23rd January 2008)

  4. #3
    chalkwellstu's Avatar
    Join Date
    Sep 2007
    Location
    Leigh on Sea
    Posts
    148
    Thank Post
    5
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by ICT_GUY View Post
    'add a printer but do not make it the default.

    Set wshNetwork = CreateObject("WScript.Network")
    wshNetwork.AddWindowsPrinterConnection "\\servername\printername"

    'add another printerand make it the default.

    wshNetwork.AddWindowsPrinterConnection "\\servername\printername"
    wshNetWork.SetDefaultPrinter "\\servername\printername"
    thanks ICT_GUY very much appreciated.



SHARE:
+ Post New Thread

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
  •