Jump to content

Recommended Posts

Posted

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"

or

rundll32 printui.dll,PrintUIEntry /in /n "\\fs1\Basement Plotter HP5500"

I also tried variable string substitution... all I get is

The system cannot find the path specified.

Any workarounds or am I outta luck?


Posted

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.

Posted

Old DOS solutions might work, but might not:

start "\\fs1\Basement Plotter HP5500

OR

SET fs1=\\fs1\Basement Plotter HP5500

start fs1

Posted

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.

Posted

OK... this worked!:

' CONPRINT.vbs
Set NetObj = CreateObject("WScript.Network")
PRINTER = WScript.Arguments(0)
NetObj.AddWindowsPrinterConnection PRINTER

and then running >

CONPRINT.vbs "\\server\long printer share name"

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...