Jump to content

Add network Printer and set as default. ?


Recommended Posts

Greetings,

Ultimately, I need my script to add a shared network printer (\\servername\printersharename) to a user's machine and set it to be the default printer regardless of what other printers are on the machine, and regardless of whether there is a currently selected default printer.

RunWait(@ComSpec & ' /c start \\ehprnt\admit-4')
RunWait(@ComSpec & ' /c start \\ehprnt\admit-6')

I am using these lines for starters and it works fine, though if possible I would like to suppress the black box that says:

"CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.

Is there a way to start this command in the @WindowsDir folder and not the one where the script resides?

Also, as mentioned above, is there a way to make the printer the default printer?

Thanks.

P...

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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