Symantec Management Platform (Notification Server)

 View Only
  • 1.  Map a network printer W7

    Posted Aug 11, 2014 07:43 AM

    We have tried to map a network printer via vbscript like this:

     

    Set WshNetwork = CreateObject("WScript.Network")

    WshNetwork.AddWindowsPrinterConnection "\\server\print"

    Set WshNetwork = Nothing

     

    It works fine in Windows XP, but not in Windows 7. If we run the script with an admin account in windows 7, it works fine, but if we execute it with SYSTEM account, it fails (SYSTEM account is symantec credentials). There is no output error code and we have tried to disable User Account Control.

     

    Any ideas?

     

    Thanks.



  • 2.  RE: Map a network printer W7

    Posted Aug 11, 2014 10:06 AM

    this is what I've done:

    On Error Resume Next
    Set WshNetwork = CreateObject("WScript.Network")

    'Location of printers 

    PrinterPath = "\\server\printer"

    'Printer driver name CHECK PRINT MANAGEMENT OR PRINT PROPERTIES

    PrinterDriver = "Name Of Printer Driver"

    'Mapping Printers with Drivers

    WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

    OR 

    If you have printer Printer Mangement Role enable on the Printer server you can deploy using Group Policy.