Highlighted
kgazzawa Absent Member.
Absent Member.
1826 views

unc naming question for NDPS printers

I am writing a vbscript to connect each of my NDPS printers to a generic printer driver in Windows, print a simple text message to the printer requesting that users reply with the printer's location, and then move on to the next NDPS printer. The vbscript has an AddPrinterConnection function to do this, but I can't figure out the UNC path syntax to represent the NDPS printer to the function. I used a companion function to enumerate the printers and that would return the NDPS connected printer as \\Tree\printer.context.context but using that same syntax as the input to connect to a printer results on an error that "WSHNetwork.AddPrinterConnection: No network provider accepted the given network path."

Could someone tell me the correct UNC syntax? We do not emulate bindery queues; so I can't use Capture so far as I can tell, with the XP v4.91 Sp4 clients.

KellyG
0 Likes
1 Reply
Marcel_Cox Absent Member.
Absent Member.

Re: unc naming question for NDPS printers

By default, NDS UNC names are evaluated according to the current context. As such, to make sure your name is universal, you should use something like:
\\Tree\.printer.context.context
Note the dot after the backslash.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.