Win32_Printer.Location setting help

  • Thread starter Thread starter Jim Vierra
  • Start date Start date
J

Jim Vierra

Does anyone know why WMI can set Win32_Printer.location on XP and not on Windows Server 2003?
 
I have it working on both of these OS's WinXP and Win2k3SP1.

Can you describe in more detail the problem you are having on Win2k3?
 
Hi Scott

On W2K3, 3 systems checked, I get an "unsupported" on the "Put_". If you need I will track down the code. I don't have it at my fingertips just now.

What MOF and WINCIM32 are you running on W2K3. Perhaps that is the issue?

I have not tested on SP1 as of this date.

--
Jim Vierra

I have it working on both of these OS's WinXP and Win2k3SP1.

Can you describe in more detail the problem you are having on Win2k3?
 
I was only using the default install no custom mof files or anything like that. Specifically I was using Win32_Printer in the root\cimv2 namespace and wbemtest.exe as the client.

If you can track down the code and post it. I can take another look for you...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure


Hi Scott

On W2K3, 3 systems checked, I get an "unsupported" on the "Put_". If you need I will track down the code. I don't have it at my fingertips just now.

What MOF and WINCIM32 are you running on W2K3. Perhaps that is the issue?

I have not tested on SP1 as of this date.

--
Jim Vierra

I have it working on both of these OS's WinXP and Win2k3SP1.

Can you describe in more detail the problem you are having on Win2k3?
 
Scott -

On W2K3 SP1 I can change the location with no error from wbemtest but the location does not really get changed. If I reopen the instance it is back to the original setting.

I didn't find the original script but cloned one from "Scriptomatic" It works on SP1 and XP. Now I will test it on W2K and W2K3.

Here is the script.- be careful where you run it from as it will re-locate every printer it finds.

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

arrComputers = Array(".")
For Each strComputer In arrComputers
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & strComputer
WScript.Echo "=========================================="

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Printer", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each objItem In colItems
WScript.Echo "Attributes: " & objItem.Attributes
WScript.Echo "Location: " & objItem.Location
objItem.Location = "Hello World!"
objItem.Put_
objItem.Location = "Hello World!"
Next
Next


--
Jim Vierra

I was only using the default install no custom mof files or anything like that. Specifically I was using Win32_Printer in the root\cimv2 namespace and wbemtest.exe as the client.

If you can track down the code and post it. I can take another look for you...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure


Hi Scott

On W2K3, 3 systems checked, I get an "unsupported" on the "Put_". If you need I will track down the code. I don't have it at my fingertips just now.

What MOF and WINCIM32 are you running on W2K3. Perhaps that is the issue?

I have not tested on SP1 as of this date.

--
Jim Vierra

I have it working on both of these OS's WinXP and Win2k3SP1.

Can you describe in more detail the problem you are having on Win2k3?
 
Scott

On W2K Server (SBS) and W2K Pro

SWbemObject: Provider is not capable of the attempted operation

on the Put_

I think I typo-ed the first post and said W2K3 when I meant W2K. Haven't looked at this issue for nearly a month.

I wonder if there is an update to WINCIM for W2K that will allow location to be updated?

--
Jim Vierra

I was only using the default install no custom mof files or anything like that. Specifically I was using Win32_Printer in the root\cimv2 namespace and wbemtest.exe as the client.

If you can track down the code and post it. I can take another look for you...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure


Hi Scott

On W2K3, 3 systems checked, I get an "unsupported" on the "Put_". If you need I will track down the code. I don't have it at my fingertips just now.

What MOF and WINCIM32 are you running on W2K3. Perhaps that is the issue?

I have not tested on SP1 as of this date.

--
Jim Vierra

I have it working on both of these OS's WinXP and Win2k3SP1.

Can you describe in more detail the problem you are having on Win2k3?
 
That would make sense. I believe that on WinXP and above only win32_printer supports put_ method. Win2k does not...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure

Scott

On W2K Server (SBS) and W2K Pro

SWbemObject: Provider is not capable of the attempted operation

on the Put_

I think I typo-ed the first post and said W2K3 when I meant W2K. Haven't looked at this issue for nearly a month.

I wonder if there is an update to WINCIM for W2K that will allow location to be updated?

--
Jim Vierra

I was only using the default install no custom mof files or anything like that. Specifically I was using Win32_Printer in the root\cimv2 namespace and wbemtest.exe as the client.

If you can track down the code and post it. I can take another look for you...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure


Hi Scott

On W2K3, 3 systems checked, I get an "unsupported" on the "Put_". If you need I will track down the code. I don't have it at my fingertips just now.

What MOF and WINCIM32 are you running on W2K3. Perhaps that is the issue?

I have not tested on SP1 as of this date.

--
Jim Vierra

I have it working on both of these OS's WinXP and Win2k3SP1.

Can you describe in more detail the problem you are having on Win2k3?
 
I wonder if there is an upgrade WINCIM32 that would work on W2K?

--
Jim Vierra

That would make sense. I believe that on WinXP and above only win32_printer supports put_ method. Win2k does not...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure

Scott

On W2K Server (SBS) and W2K Pro

SWbemObject: Provider is not capable of the attempted operation

on the Put_

I think I typo-ed the first post and said W2K3 when I meant W2K. Haven't looked at this issue for nearly a month.

I wonder if there is an update to WINCIM for W2K that will allow location to be updated?

--
Jim Vierra

I was only using the default install no custom mof files or anything like that. Specifically I was using Win32_Printer in the root\cimv2 namespace and wbemtest.exe as the client.

If you can track down the code and post it. I can take another look for you...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure


Hi Scott

On W2K3, 3 systems checked, I get an "unsupported" on the "Put_". If you need I will track down the code. I don't have it at my fingertips just now.

What MOF and WINCIM32 are you running on W2K3. Perhaps that is the issue?

I have not tested on SP1 as of this date.

--
Jim Vierra

I have it working on both of these OS's WinXP and Win2k3SP1.

Can you describe in more detail the problem you are having on Win2k3?
 
No, there is no upgrade outside of the OS upgrade...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure

I wonder if there is an upgrade WINCIM32 that would work on W2K?

--
Jim Vierra

That would make sense. I believe that on WinXP and above only win32_printer supports put_ method. Win2k does not...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure

Scott

On W2K Server (SBS) and W2K Pro

SWbemObject: Provider is not capable of the attempted operation

on the Put_

I think I typo-ed the first post and said W2K3 when I meant W2K. Haven't looked at this issue for nearly a month.

I wonder if there is an update to WINCIM for W2K that will allow location to be updated?

--
Jim Vierra

I was only using the default install no custom mof files or anything like that. Specifically I was using Win32_Printer in the root\cimv2 namespace and wbemtest.exe as the client.

If you can track down the code and post it. I can take another look for you...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure


Hi Scott

On W2K3, 3 systems checked, I get an "unsupported" on the "Put_". If you need I will track down the code. I don't have it at my fingertips just now.

What MOF and WINCIM32 are you running on W2K3. Perhaps that is the issue?

I have not tested on SP1 as of this date.

--
Jim Vierra

I have it working on both of these OS's WinXP and Win2k3SP1.

Can you describe in more detail the problem you are having on Win2k3?
 
Thanks Scott - too bad.

--
Jim Vierra

No, there is no upgrade outside of the OS upgrade...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure

I wonder if there is an upgrade WINCIM32 that would work on W2K?

--
Jim Vierra

That would make sense. I believe that on WinXP and above only win32_printer supports put_ method. Win2k does not...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure

Scott

On W2K Server (SBS) and W2K Pro

SWbemObject: Provider is not capable of the attempted operation

on the Put_

I think I typo-ed the first post and said W2K3 when I meant W2K. Haven't looked at this issue for nearly a month.

I wonder if there is an update to WINCIM for W2K that will allow location to be updated?

--
Jim Vierra

I was only using the default install no custom mof files or anything like that. Specifically I was using Win32_Printer in the root\cimv2 namespace and wbemtest.exe as the client.

If you can track down the code and post it. I can take another look for you...

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure


Hi Scott

On W2K3, 3 systems checked, I get an "unsupported" on the "Put_". If you need I will track down the code. I don't have it at my fingertips just now.

What MOF and WINCIM32 are you running on W2K3. Perhaps that is the issue?

I have not tested on SP1 as of this date.

--
Jim Vierra

I have it working on both of these OS's WinXP and Win2k3SP1.

Can you describe in more detail the problem you are having on Win2k3?
 
Back
Top