最佳解答者
batch file

問題
解答
-
I think you may get problem to map a network printer to LPT.
You can use follow command in bat file
1. map printer
rundll32 printui.dll,PrintUIEntry /in /q /n\\servername\printername
2. delete network printer
rundll32 printui.dll,PrintUIEntry /dn /q /n\\servename\printername
3. Set the default printer
rundll32 printui.dll,PrintUIEntry /y /n\\servername\printername*Note" the "PrintUIEntry" is case sensivity (P , U, I , E must be big letter)
another way is use VBScript.
use notepad to create .vbs file and put code
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection "\\PrintServer1\Xerox300"
objNetwork.SetDefaultPrinter \\PrintServer1\Xerox300Informations From Microsoft Scripting Guy website
http://www.microsoft.com/technet/scriptcenter/resources/qanda/jan05/hey0113.mspx
2008年11月20日 上午 03:47
所有回覆
-
I think you may get problem to map a network printer to LPT.
You can use follow command in bat file
1. map printer
rundll32 printui.dll,PrintUIEntry /in /q /n\\servername\printername
2. delete network printer
rundll32 printui.dll,PrintUIEntry /dn /q /n\\servename\printername
3. Set the default printer
rundll32 printui.dll,PrintUIEntry /y /n\\servername\printername*Note" the "PrintUIEntry" is case sensivity (P , U, I , E must be big letter)
another way is use VBScript.
use notepad to create .vbs file and put code
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection "\\PrintServer1\Xerox300"
objNetwork.SetDefaultPrinter \\PrintServer1\Xerox300Informations From Microsoft Scripting Guy website
http://www.microsoft.com/technet/scriptcenter/resources/qanda/jan05/hey0113.mspx
2008年11月20日 上午 03:47