problem with querying remote-pc

Joined
Apr 26, 2006
Messages
1
Reaction score
0
Hi,

I'm new here.

I'm playing with WMI in C++ and I got my first results. But when I switch to a remote PC I encounter a problem ...

So let me describe what I'm doing:
CoInitializeEx() --> S_OK
CoInitializeSecurity() --> S_OK
CoCreateInstance() --> S_OK
ConnectServer() --> S_OK
ExecQuery() --> Error

The error-number is 0x80041003 which is ACCESS_DENIED (I think).
So what's the problem here?


When I modify my program to access the local machine (removing IP-adress, connecting to 'root/CIMV2' only, no user-name, no password) everything works fine.
I can access the remote mache via the command-line:
C:\>wmic /node:10.3.9.163 /user:LisaG /password:Autobus1 BIOS get biosversion

and get the information (different from the BIOS-version of my local machine).

Using the WMICodeCreator I can create a little script in VBScript that accesses the remote machine and queries it.

So the access should work, at least it does via VBScript and the WMIC. But it does not work in C++.

Can someone please give me a tip. Thanks.

August

 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top