473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Suppress DCOM error when attempting to Read Remote Registry from vb.net

I am have created a reporting tool for our network to output various
information we are interested in like Microsoft Office versioning
information and etc. One of the things I have to do is attempt to Read
the machines Registry remotely like so:

Private Function ReadRegistryKey(ByVal strRLoc As String, _
ByVal strSubKey As String, ByVal strVal As String, _
ByVal strMachineName As String) As String
Dim rKey As RegistryKey, sKey As String
Try
rKey =
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMa chine,
strMachineName)
rKey = rKey.OpenSubKey(strRLoc & strSubKey)
sKey = rKey.GetValue(strVal)
Return sKey
Catch ex As Exception
Return ""
End Try
End Function

If the Remote Registry service has been disabled or the computer is off
then I am getting a System event log entry:

Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10009
Date: 2/4/2005
Time: 1:52:01 PM
User: XXX\xxxxxxxx
Computer: XXXXXXXXXX
Description:
DCOM was unable to communicate with the computer XXXXXXX using any of
the configured protocols.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
I would like to supress these event log entries if possible.

Does anyone have any ideas on what I would need to do?

Sincerely,

Timothy Frawley

Nov 21 '05 #1
4 3527
best guess this is part of the DCOM functionality, which logs error.
i am quite sure that you will be unable to supress these log entries.

so you can do 2 things, first cheif if the machine is online, and then
check if the Remote Registry service is running.

Nov 21 '05 #2
Hi Tim,

I agree with Nikolay's suggestion. Also .NET provide a ServiceController,
which will help us to determine the service on remote machine. We use
try..catch, in case the remote machine is down.

Imports System.ServiceProcess
Module Module1
Sub Main()
Try
Dim sc As New ServiceController
sc.MachineName = "remotemachinename"
sc.ServiceName = "RemoteRegistry"
Console.Write(sc.Status.ToString())
Catch ex As Exception
Console.Write(ex.ToString())
End Try
End Sub
End Module

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #3


Thank you both, Nikolay and Peter,

Your posts where very helpful. I have applied your suggestions and I
believe I will no longer have DCOM errors in the event log!!

Thank you again!

Tim

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #4
Hi Tim,

I am glad that our suggestion helped you, and thank Nikolay for sharing the
knowledge in the community. :)

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Prashanth Uppunda | last post by:
Hello, Does anybody have an idea on how to instantiate a DCOM server residing in another machine using C#? Thanks Prashanth
2
by: David Olive | last post by:
Hi guys, I'm having a bit of a problem getting a VB .NET console app to run happily as a scheduled task. The app itself generates a bunch of word documents on a file share on another server by...
5
by: Sergey V | last post by:
Having following problem 1. Client: ASP application with anonymous access to be running as DOMAIN\my_user on WinXP 2. Server: DCOM NT Service runs on remote host (W2K Server) under the same...
0
by: csharp_helpwanted | last post by:
steps.. first, I'm creating a connection by mapping a network drive to the pc second, the map drive connection was successful I try to read a certian registry key/value (that is a valid reg...
13
by: Kyle Adams | last post by:
I don't know where is the right place to ask this so I will start here. Can someone explain to me what these represent? I think they all have to do with the middleware level, but I really don't...
1
by: PrettySneaky | last post by:
I currently working on a webservice which calls a DCOM object! The webproject works just fine when i run it in Visual studio 2005. However due to some compability issues with .NET 2.0 and the...
0
by: matsla | last post by:
I have followed all guide lines to set up remote debugging but is it possible to do cross-domain remote debugging? I use same account/password on both computers (XP => 2003), added users to debug...
0
by: James | last post by:
a common error registering on my xp machine is "DCOM was unable to communicate with the computer xxxx using any of the configured protocols." i want to know what classes in vb.net can i use to...
1
by: Paul W | last post by:
I attempted to find the solution and came close (http://blogs.msdn.com/robgruen/archive/2005/01/24/359660.aspx) but cannot go any further. I have an ASP.NET (2003/C#) app that calls a VB 6 DCOM on...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.