Jump to content
Sign in to follow this  

Add network Printer and set as default. ?

Recommended Posts



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?



Share this post

Link to post
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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.