+ Reply to Thread
Results 1 to 2 of 2

Thread: .VBS printer script help

  1. #1
    Registered User
    Join Date
    09-16-2011
    Location
    Djupivogur, Iceland
    MS-Off Ver
    Excel 2007
    Posts
    30

    .VBS printer script help

    I know I'm not posting this in the right forum, but I'm gonna give it a try anyway.

    Can anyone tell me what is wrong with this printer script?
    Set WshNetwork = WScript.CreateObject("WScript.Network")
    PrinterPath = "\\VARDA\HPK850"
    WshNetwork.AddWindowsPrinterConnection PrinterPath
    PrinterPath = "\\VARDA\HP5700"
    WshNetwork.AddWindowsPrinterConnection PrinterPath
    PrinterPath = "\\VARDA\HP1606"
    WshNetwork.AddWindowsPrinterConnection PrinterPath
    WshNetwork.SetDefaultPrinter PrinterPath
    WScript.quit
    It delivers this error message

    Script: C:\Docum~\Administrator.VARDA\Desktop\ken_prentarar.vbs
    Line: 3
    Char: 1
    Error: The filename, directory name, or volume label syntax is incorrect
    Code: 8007007B
    Source: (null)
    Last edited by romperstomper; 09-29-2011 at 07:09 AM. Reason: add code tags

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Nowhere
    MS-Off Ver
    None
    Posts
    8,275

    Re: .VBS printer script help

    Is that definitely the correct share name for the printer?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0