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
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