Nope... I tried the code and it didn't work on machines running WinXP SP2 with firewall turned on. An exception was thrown at this line
Code:
queryCollection = query.Get()
The error message is "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)".
The reason I asked was that I had coded something similar to this a while ago and couldn't get it to work with WinXP SP2. I received the same exception everytime my program tried to pull information from a WinXP SP2 machine. I ended up trashing the project because I don't know how to by pass the firewall.
Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it. - Abraham Lincoln -
Re: [2005] Find the logged on user of a remote Win2k/XP machine (Console Application)
The reason I asked was that I had coded something similar to this a while ago and couldn't get it to work with WinXP SP2. I received the same exception everytime my program tried to pull information from a WinXP SP2 machine. I ended up trashing the project because I don't know how to by pass the firewall.[/QUOTE]
Sorry I just read up to the WinXP SP2 part so I guess the question is what do you expect? Of course the firewall is going to block it, thats the whole point of a firewall You could open the ports allowing WMI access....