'Error 800A01CE, add printer by vbs throught ip

When I tried a small code to add printer on window 10 enterprise 64bits. I meet error 800A01CE. Please help me to resolve this problem. This is my source

Option Explicit
Dim strPrinterUNC, objNetwork 

strPrinterUNC = "\\10.95.200.11\HP LaserJet 400" 

Set objNetwork = createObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection strPrinterUNC
objNetwork.SetDefaultPrinter strPrinterUNC 

Set objNetwork = Nothing
MsgBox ("Add printer successfully")

My error as image.

I tried change strPrinterUNC manytime, but I still got the error above. Please suggest me the way to custom my code. Thank you,



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source