Normal 0 false false false false EN-US X-NONE X-NONE
Im a new VMware View Admin and Im having an issue with location based printing. It is not consistently working and instead of spinning my wheels on that I want to try and write a script that runs at every startup or login and either maps a printer based on the machine name of the client device (found in the registry). The client machine name attribute doesn’t get added in until the user logins. Also I already have a computer name convention in place so that the computer name has the location in it. The naming convention variables are Location/Year/DeviceType/NumberSequence, Example: HomeOffice13D001; SouthOffice13D002; Shipping13D003; Admin13D004
So this is what I need the script to do step by step.
- Find the machine name of the client device. Located at HKCU\Volatile Environment\ViewClient_Machine_Name
- Match the machine variable to a “printer table” that I have setup. Currently have it in spreadsheet, Which looks like this:
Client machine name | Printer name | Printer location |
Computer 1 | Printer 1 | \\PrintServer\Printer1 |
Computer 2 | Printer 2 | \\PrintServer\Printer2 |
Computer 3 | Printer 3 | \\PrintServer\Printer3 |
Computer 4 | Printer 4 | \\PrintServer\Printer4 |
Computer 5 | Printer 5 | \\PrintServer\Printer5 |
Computer 6 | Printer 6 | \\PrintServer\Printer6 |
Computer 7 | Printer 7 | \\PrintServer\Printer7 |
Computer 8 | Printer 8 | \\PrintServer\Printer8 |
Computer 9 | Printer 9 | \\PrintServer\Printer9 |
3. Then installs the needed printer and makes it the default printer.
I can change the printer table to a xml table if needed. Also if it would be easier for all the printers to be installed locally so the script would just change the default printer based on the location I can do that. But if I switched to local printers I wouldn’t able to kill the print jobs from my Windows Print Server.
If anyone can help me get started or tell me that I’m going about this all the wrong my just let me know. Thanks