Re: Updated: Error on Win2K Server
- From: Gerry Hickman <gerry666uk@xxxxxxxxxxxxxxxx>
- Date: Fri, 29 Sep 2006 11:48:45 +0100
Hi Paul,
In that case it looks like WMI is seriously messed up on those servers. How many Win2k servers did you test it on?
We are running a pure Win2k network and we use WMI as an essential part of it, we run tasks nearly every night.
You may need to look at error logs, Event logs on these servers and also look at the WBEM folder to see if anything looks odd. Also check the WMI Control in the MMC on those machines.
In general WMI works perfectly on Win2k, both servers and clients.
Paul wrote:
Hi
I received this one on Win2K Servers.
Microsoft (R) Windows Script Host Version 5.1 for Windows
Copyright (C) Microsoft Corporation 1996-1999. All rights reserved.
D:\wmilocal.js(3, 1) SWbemLocator: Server execution failed
object is returned under WinXP and Win2003 Server.
"Gerry Hickman" <gerry666uk@xxxxxxxxxxxxxxxx> wrote in message news:el8P5k04GHA.3732@xxxxxxxxxxxxxxxxxxxxxxxHi,
Please try this script to test your win2k servers, save it as wmilocal.js and run it using CScript at a CMD prompt like this
CScript wmilocal.js
// wmilocal.js
var oLoc = new ActiveXObject("WbemScripting.SWbemLocator");
var oSvc = oLoc.ConnectServer(".", "root\\cimv2");
WScript.Echo(typeof oSvc);
oSvc = null;
oLoc = null;
Paul wrote:This problem occured on all Win2K servers (Domain Controller and Member Server) but NO problem with Win2003 Server (Member Server) and WinXP terminal. Why was it so ? Seemingly the older OS got problem with it. Any solution ?
"Paul" <paulw_win@xxxxxxxxx> wrote in message news:Oz0025p4GHA.4820@xxxxxxxxxxxxxxxxxxxxxxxI wrote a procedure in Visual Foxpro as below. It runs well under WinXP but failed on the Win2K Server with Service Pack 4 installed.
objLocator = CREATEOBJECT("WBEMScripting.SWBEMLocator")
objService = objLocator.ConnectServer
objService.Security_.ImpersonationLevel=3
objcolInstalledPrinters = objService.ExecQuery("SELECT * FROM Win32_Printer")
FOR EACH objPrinter IN objcolInstalledPrinters
MESSAGEBOX(objPrinter.DeviceID)
ENDFOR
The first line is ok. The second line caused
The error following error message appears
OLE |Dispatch exception code 0 from SWbemlocator: Server excution failed
I'd then changed it to objService = objLocator.ConnectServer(".","root\cimV2"), still the same. Indeed, what's wrong with Win2K server ? How come no problem on WinXP ? Thanks.
--
Gerry Hickman (London UK)
--
Gerry Hickman (London UK)
.
- Follow-Ups:
- Re: Updated: Error on Win2K Server
- From: Paul
- Re: Updated: Error on Win2K Server
- References:
- Re: Updated: Error on Win2K Server
- From: Gerry Hickman
- Re: Updated: Error on Win2K Server
- From: Paul
- Re: Updated: Error on Win2K Server
- Prev by Date: Re: Remotely execute programs/exe
- Next by Date: Re: impersonationLevel=impersonate, Security Settings
- Previous by thread: Re: Updated: Error on Win2K Server
- Next by thread: Re: Updated: Error on Win2K Server
- Index(es):
Relevant Pages
|