RPC Error
-
Hei, I'm trying to get the Processor IDs of different PCs on the network. It works fine for one PC but when I use it to fetch IDs of more then one PC it return the IDs of first system and gives error at the second PC. Error RPC server is unavailable. (Exception from HRESULT: 0x800706BA) I have search this problem over the net and find this solution. http://support.microsoft.com/kb/884564[^] but each time i cant restart the system for taking the id of second PC.' Any Solution? Thanks
Syed Shahid Hussain
-
Hei, I'm trying to get the Processor IDs of different PCs on the network. It works fine for one PC but when I use it to fetch IDs of more then one PC it return the IDs of first system and gives error at the second PC. Error RPC server is unavailable. (Exception from HRESULT: 0x800706BA) I have search this problem over the net and find this solution. http://support.microsoft.com/kb/884564[^] but each time i cant restart the system for taking the id of second PC.' Any Solution? Thanks
Syed Shahid Hussain
How do you get the processor ID on the remote machine? I have always used WMI for that: http://msdn.microsoft.com/en-us/library/aa394373(VS.85).aspx[^]
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
How do you get the processor ID on the remote machine? I have always used WMI for that: http://msdn.microsoft.com/en-us/library/aa394373(VS.85).aspx[^]
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
I'm using
ManagementScope scope = new ManagementScope("system path"); ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_Processor"); ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query); ManagementObjectCollection queryCollection = searcher.Get(); Now search here for "ProcessorId"
Is it the right way?Syed Shahid Hussain
-
I'm using
ManagementScope scope = new ManagementScope("system path"); ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_Processor"); ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query); ManagementObjectCollection queryCollection = searcher.Get(); Now search here for "ProcessorId"
Is it the right way?Syed Shahid Hussain
Seems to be correct... Is
"system path"
in this format?\\\\FullComputerName\\root\\cimv2
Also, you don't callscope.Connect()
. Maybe this is the reason? Here's an example: http://msdn.microsoft.com/en-us/library/system.management.managementscope.aspx[^]Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
-
Seems to be correct... Is
"system path"
in this format?\\\\FullComputerName\\root\\cimv2
Also, you don't callscope.Connect()
. Maybe this is the reason? Here's an example: http://msdn.microsoft.com/en-us/library/system.management.managementscope.aspx[^]Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
Thanks Dmitry for ur quick reply. ur syntax is right. And here i have send the short code. I have called coonnect method and all other thing related to that but problem is here with
scope.connect()
When the control comes at this point at the secong time it give this RPC error . What to do in ur suggestion. Is there any other way for geting the LAN PC's processor IDs ?:confused: Thanks
Syed Shahid Hussain
-
Thanks Dmitry for ur quick reply. ur syntax is right. And here i have send the short code. I have called coonnect method and all other thing related to that but problem is here with
scope.connect()
When the control comes at this point at the secong time it give this RPC error . What to do in ur suggestion. Is there any other way for geting the LAN PC's processor IDs ?:confused: Thanks
Syed Shahid Hussain