bek Posted August 10, 2004 Posted August 10, 2004 I have run into a snag trying to automate installing printers. Usually I just call up \\server\printershare, how ever this server has long share names with spaces and quoting them doesn't work!.start "\\fs1\Basement Plotter HP5500"orrundll32 printui.dll,PrintUIEntry /in /n "\\fs1\Basement Plotter HP5500"I also tried variable string substitution... all I get isThe system cannot find the path specified.Any workarounds or am I outta luck?
JPamplin Posted August 10, 2004 Posted August 10, 2004 Well, if this is something you have control over, can you rename it to one word?
bek Posted August 10, 2004 Author Posted August 10, 2004 Unfortunatley, no. All the print queues are named this way. I wouldn't have done it that way but...There would be the issue of getting all the client machines printers changed over etc. Not impossible, but some work, esp. in regards to whatever is their current default.Thanks.
jdoe Posted August 10, 2004 Posted August 10, 2004 There's a link to another way to connect printer.I'm not very confident but it cost nothing to try...VBScript by Interface
mazin Posted August 10, 2004 Posted August 10, 2004 Old DOS solutions might work, but might not:start "\\fs1\Basement Plotter HP5500ORSET fs1=\\fs1\Basement Plotter HP5500start fs1
visaversa Posted August 10, 2004 Posted August 10, 2004 or you could change the hostname to an ip address, maybe there is your problem..start "\\192.168.1.1\Basement Plotter HP5500"
bek Posted August 16, 2004 Author Posted August 16, 2004 I will try it using that vbs...No, IP address doesn't work either... it just doesn't accept a share name with spaces, wether I quote it, or not, or set in a variable... which is also why I am skeptical that the vb script will work.thanks for the input.
bek Posted August 16, 2004 Author Posted August 16, 2004 OK... this worked!:' CONPRINT.vbsSet NetObj = CreateObject("WScript.Network")PRINTER = WScript.Arguments(0)NetObj.AddWindowsPrinterConnection PRINTERand then running >CONPRINT.vbs "\\server\long printer share name"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now