Currently, in our labs, our SysAdmins add a Local Port printer off of a print server, so all users of that machine get the same printer automatically. I am trying to write a script that I can run from my office that will do something similar to a remote PC. I'm running into some dead ends, and was hoping the group could point me in a direction that will actually work!
What is the best way to go about this? I can find lots of examples of scripts that add a printer to the current PC, but not to a remote PC. When I tried using WSHRemote to run a script on a remote PC, I could never get WSHRemote to run, but now just realized that I probably have to open up the firewall ports to allow WSH/WMI to work. If this way works, I have two questions: Anyone know what ports I have to open? If I add the printer and use the SetDefaultPrinter option, will that set it so *all* users of the machine will have the printer?
I've also just started using the MS-provided printer scripts like prnmgmt.vbs in C:\Windows\System32, but have had problems. It seems like whenever there is ANY kind of error, you get the message "Invalid Parameter".
I've also played with printui.dll, but didn't like the fact that if I set a global printer with /g, I have to use printui.dll to get rid of it. Also, for some reason, the default printer option, /y, never worked for me.
Hoping I can get some help from the experts here! Thanks!