WMI from a Service

dantell

New member
Joined
Mar 20, 2009
Messages
2
Programming Experience
3-5
Hello,

I've built a simple service (vb.net v2) that first pings a machine to see if its alive, then collects CPU load and Logged in users and updates a db. It works fine from the non-domain machine i built on.

I also wrapped the same code in a command line tool for testing. This tool works everywhere i've tried it. The 2 WMI calls fail with a RPC server unavailable when fired from the service on a domain win2k3 server.

The service fails with that error, but the command line tool runs perfectly fine from the same server. I have adjusted the login account to use the same account, I have even added impersonation to the service and hard coded the account to use in it.

firewalls are off, tested on 2 virtualized instances.

Am i missing something? This is my first attempt at a windows service.

Thanks,
David
 
ive also tested this on a physical box with the same results. I installed wmi code creator on the same box and tried the same query as generated, and i get a "invalid parameter" error.

I copied my same command line tool to this box and it runs as it should with no errors, and returns the requested data.

At a loss, it must be something silly i am missing.
 
Back
Top