Re: Updated: Error on Win2K Server



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@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

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@xxxxxxxxxxxxxxxxxxxxxxx
I 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)


.



Relevant Pages

  • Re: Updated: Error on Win2K Server
    ... 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. ... object is returned under WinXP and Win2003 Server. ... Server) but NO problem with Win2003 Server and WinXP terminal. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: Updated: Error on Win2K Server
    ... I restarted the Windows Management Instrumentation ... In that case it looks like WMI is seriously messed up on those servers. ... How many Win2k servers did you test it on? ... object is returned under WinXP and Win2003 Server. ...
    (microsoft.public.win32.programmer.wmi)
  • Re: Friendly name not resolve?
    ... > running the setup from win2k cd server. ... > I have serveral WIN2K servers on the same subnet as the newly upgrade ADS ... I just added those WIN2K servers to the Domain ADS. ... Those global groups appear as the SID number ...
    (microsoft.public.win2000.security)
  • Re: Changing from a "child like" parent domain to a proper top level domain
    ... I personally would prefer a dc/gc at the remote site, ... It should at least be a member server to facilitate ... 20 users at site A. Two Win2k servers with AD running in mixed mode. ... · Create the yyy.com AD on the remote site Win2k server. ...
    (microsoft.public.win2000.active_directory)
  • Friendly name not resolve?
    ... running the setup from win2k cd server. ... The upgrade process seem to be ... I have serveral WIN2K servers on the same subnet as the newly upgrade ADS ... When trying to add the Domain global groups to each of the WIN2K servers's ...
    (microsoft.public.win2000.security)