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