I'm getting an error when I try to restore printer settings to a network printer. I can restore local printer settings. Works fine. If the network printer is not installed that will work also. I get an error of 0x0000000c when I attempt to restore settings to a UNC\Network Printer. Does anyone know why this is failing? Thanks!!
Part of my function.
If outputMethod = "Save in User Box" Then buildOutputCode = "07" End If
If outputMethod = "Save in User Box Print" Then buildOutputCode = "08" End If
WriteRegKey_Binary(model, printername, printertype, servername, "OutputMethod", "OutputMethodValue", buildOutputCode)
Dim binFile As String = My.Application.Info.DirectoryPath & "\printui\" & printername & ".dat"
If printerType = "Network" Then
printername = "\" & servername & "\" & printername
End If
if notInstalled = True then
Call Shell("RUNDLL32 PRINTUI.DLL,PrintUIEntry /in /q /n" & """" & printername & """" & "")
else
Call Shell("RUNDLL32 PRINTUI.DLL,PrintUIEntry /Sr /n" & """" & printername & """" & " /a " & """" & binFile & """" & " u ")
end if