Re: Error in ExecQuery



I believe that the issue that Gerry is referring to was in the following
call

// For example, get the name of the operating system
IEnumWbemClassObject* pEnumerator = NULL;
hres = pSvc->ExecQuery(
bstr_t("WQL"),
bstr_t("Select * from Win32_OperatingSystem"),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&pEnumerator);

The problem was that the WBEM_FLAG_RETURN_IMMEDIATELY which can bypass the
real error in some cases. If you eliminate that particular flag you may get
more information about the failing hres.

--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure


"itaihor" <itaihor@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A228A428-67CA-44E2-A568-CC51EDF1BCE6@xxxxxxxxxxxxxxxx
> Hi,
>
> The program works properly on local computer.
> I'm an administrator and the account I'm trying to connect to is an
> administrator too.
>
> OS: Windows XP.
>
> Thanks
>
> "Gerry Hickman" wrote:
>
>> Hi,
>>
>> Please can you first try a script version on the same computer using the
>> same user account and see if you get an error. You didn't state your
>> operating systems or user credentials.
>>
>> itaihor wrote:
>>
>> > Hi,
>> >
>> > I'm running the following example from this link:
>> >
>> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/example__getting_wmi_data_from_a_remote_computer.asp
>> >
>> > Steps 1-5 works properly, but step 6 - ExecQuery(.....) returns the
>> > next
>> > error:
>> > hres = 0x80070721 a security package specific error occurred.
>> >
>> > Why do I get this error and what do I have to do to make it work?
>>
>>
>> --
>> Gerry Hickman (London UK)
>>


.



Relevant Pages

  • Re: How do I
    ... There is no reason in Vista to ever run as administrator on a regular basis, ... You absolutely do not want to have only one user account. ... operating system structure. ...
    (microsoft.public.windows.vista.general)
  • Re: How do I
    ... There is no reason in Vista to ever run as administrator on a regular basis, ... You absolutely do not want to have only one user account. ... operating system structure. ...
    (microsoft.public.windows.vista.general)
  • Re: Safe deletion of old user details ?
    ... Hopefully he also go the operating install disk as the best solution would ... be to do a fresh install of the operating system. ... him to have a "regular" non administrator user account for browsing the ...
    (microsoft.public.win2000.security)
  • Re: New Vista user - could use some help.
    ... I don't pretend to know all about Vista or winxp, ... I became extremely frustrated with, what I think is, User Account ... be also an administrator account, ... other modern operating systems, Vista is a multi-user operating system ...
    (microsoft.public.windows.vista.installation_setup)
  • Re: Windows 2000 User Settings
    ... Administrators can perform any and all functions supported by the operating system. ... Any right that the administrator does not have by default, ... Install the operating system and components. ... to use a "personal" computer with any less than a Power User account. ...
    (microsoft.public.win2000.general)