使用“VB 2008”删除网络打印机。 [英] remove network printer using "VB 2008"
本文介绍了使用“VB 2008”删除网络打印机。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在VBScript中使用以下内容将删除网络打印机连接,我无法弄清楚如何在VB 2008中完成此操作。
设置objNetwork = CreateObject(" Wscript .Network")
objNetwork.RemovePrinterConnection PrinterName
I use the following in a VBScript which will remove network printer connections, I haven't been able to figure out how to accomplish this in VB 2008.
Set objNetwork = CreateObject("Wscript.Network")
objNetwork.RemovePrinterConnection PrinterName
推荐答案
你看过这段代码了吗?
http://www.tek-tips.com/viewthread.cfm?qid=1164465&page=1 一>
看起来这样会有所帮助,只需添加一个IF语句来过滤要删除的打印机
Have you looked at this code?
http://www.tek-tips.com/viewthread.cfm?qid=1164465&page=1
Looks like this will help, just add an IF statement where needed to filter what printers to remove
这篇关于使用“VB 2008”删除网络打印机。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文