P
Pedro Lima
Dear Friends,
We will rename a lot of client machines here in the network - all of them
are running Windows XP with SP2. The problem behind this fact is obvious:
many workstations using local ports that are not really "local" will face
discontinued printing services. I have made a script - based on others found
in the internet - that try to change the port. The problem is that it doesn't
work. The error is a generic failure in SWbemObjectEx (80041001) in line 9.
Here is the code:
Line 1: strComputer = "."
Line 2: Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\CIMV2")
Line 3:
Line 4: Set colPrinters = objWMIService.ExecQuery ("Select * from
Win32_Printer")
Line 5:
Line 6: For Each objPrinter in colPrinters
Line 7: If objPrinter.PortName = "\\sieci_sso01\BrotherH" Then
Line 8: objPrinter.PortName = "\\stici_sso01\BrotherH"
Line 9: objPrinter.Put_
Line10: End If
Line11: Next
Well... Does anybody have a solution for this ? This scenario is easily
reproducible in any environment, so you can see the error in your machine to
try to figure out why it happens.
We will rename a lot of client machines here in the network - all of them
are running Windows XP with SP2. The problem behind this fact is obvious:
many workstations using local ports that are not really "local" will face
discontinued printing services. I have made a script - based on others found
in the internet - that try to change the port. The problem is that it doesn't
work. The error is a generic failure in SWbemObjectEx (80041001) in line 9.
Here is the code:
Line 1: strComputer = "."
Line 2: Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\CIMV2")
Line 3:
Line 4: Set colPrinters = objWMIService.ExecQuery ("Select * from
Win32_Printer")
Line 5:
Line 6: For Each objPrinter in colPrinters
Line 7: If objPrinter.PortName = "\\sieci_sso01\BrotherH" Then
Line 8: objPrinter.PortName = "\\stici_sso01\BrotherH"
Line 9: objPrinter.Put_
Line10: End If
Line11: Next
Well... Does anybody have a solution for this ? This scenario is easily
reproducible in any environment, so you can see the error in your machine to
try to figure out why it happens.