I'm trying to write a batch file to map our users on certain floors to the printers on that floor. I figured out how to do it, but I can't get it to work for printers with a space in the name. Here's an example of one that works:
rundll32 printui.dll,PrintUIEntry /in /n \\cnemvmwie001\cnemv-08-kphc-lext630
That one works just fine. Now if I try another that has spaces in the like this:
rundll32 printui.dll,PrintUIEntry /in /n \\cnemvmwie001\cnemv-8041-xerox-workcentre pro 65
that will not work. I tried putting quotes around the name, but that won't work either. Here's the page that I used as a guide to get the first one to work:
http://techsupt.winbatch.com/TS/T000001031F17.html
Any ideas on mapping ones with spaces? Removing the spaces isn't an option, I have no control over that.
rundll32 printui.dll,PrintUIEntry /in /n \\cnemvmwie001\cnemv-08-kphc-lext630
That one works just fine. Now if I try another that has spaces in the like this:
rundll32 printui.dll,PrintUIEntry /in /n \\cnemvmwie001\cnemv-8041-xerox-workcentre pro 65
that will not work. I tried putting quotes around the name, but that won't work either. Here's the page that I used as a guide to get the first one to work:
http://techsupt.winbatch.com/TS/T000001031F17.html
Any ideas on mapping ones with spaces? Removing the spaces isn't an option, I have no control over that.