gazzanewpy
Instructor
I am now looking at swapping all batch files for vbscript ones. I am very familiar with VB and have worked a little with VBScript but this should be treated as completely new.
I have a batch file using con2prt. It first removes all network printers from a computer (to stop any risk of the roaming profiles carrying a printer attachment around). It then adds the printers for that room onto that workstation during the time of the uer's login.
I know I can use the net.addwindowsprinterconnection and the net.setdefaultprinter. Yet, the RemovePrinterConnection requires the UNC whilst con2prt can have a global element (con2prt /f removes all network printers). I want to remove all network printers (not local) and then attach the required printers, setting one as default.
Any advice on removing the printers?
I have a batch file using con2prt. It first removes all network printers from a computer (to stop any risk of the roaming profiles carrying a printer attachment around). It then adds the printers for that room onto that workstation during the time of the uer's login.
I know I can use the net.addwindowsprinterconnection and the net.setdefaultprinter. Yet, the RemovePrinterConnection requires the UNC whilst con2prt can have a global element (con2prt /f removes all network printers). I want to remove all network printers (not local) and then attach the required printers, setting one as default.
Any advice on removing the printers?