Re: Error in ExecQuery
- From: "Scott McNairy \(MVP\)" <v-scomcn@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 19 Sep 2005 13:42:59 -0700
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)
>>
.
- References:
- Re: Error in ExecQuery
- From: Gerry Hickman
- Re: Error in ExecQuery
- From: itaihor
- Re: Error in ExecQuery
- Prev by Date: Re: SWbemLocator error '80070005' Access is denied.
- Next by Date: Re: Win32_Product.Uninstall() and Profiles
- Previous by thread: Re: Error in ExecQuery
- Next by thread: Win32_Product.Uninstall() and Profiles
- Index(es):
Relevant Pages
|