473,387 Members | 1,303 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,387 software developers and data experts.

Help with WMI error message - "The object exporter specified was not found"

Can anyone help me with this piece of code. - I keep on getting the
error message "The object exporter specified was not found"

If i change it to run on my local machine it works fine, the problem
occurs when trying to connect to a remote pc.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Try
Dim connection As New ConnectionOptions
connection.Username = "the user name"
connection.Password = "the password"
connection.Authority = "ntlmdomain:the domain name"
Dim scope As New ManagementScope("\\the ip
address\root\CIMV2", connection)

scope.Connect()

Dim query As New ObjectQuery( _
"SELECT * FROM Win32_UTCTime")

Dim searcher As New ManagementObjectSearcher(scope, query)

For Each queryObj As ManagementObject In searcher.Get()

Console.WriteLine("-----------------------------------")
Console.WriteLine("Win32_UTCTime instance")
Console.WriteLine("-----------------------------------")
Console.WriteLine("DayOfWeek: {0}",
queryObj("DayOfWeek"))
Next

Close()
Catch err As ManagementException
MessageBox.Show("An error occurred while querying for WMI
data: " & err.Message)
Catch unauthorizedErr As System.UnauthorizedAccessException

MessageBox.Show("Connection error (user name or password
might be incorrect): " & unauthorizedErr.Message)
End Try
End Sub

William Cruz

*** Sent via Developersdex http://www.developersdex.com ***
May 2 '07 #1
1 5862
William,

If you reference this error you find that 2 machines may have the same IP or
the lease time is short. So, my suggestion would be to change the IP address
to the machine name & try again

What are your findings now? Will look into this problem when I get the time

--
Newbie Coder
(It's just a name)

"William Cruz" <wc*****@msn.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Can anyone help me with this piece of code. - I keep on getting the
error message "The object exporter specified was not found"

If i change it to run on my local machine it works fine, the problem
occurs when trying to connect to a remote pc.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Try
Dim connection As New ConnectionOptions
connection.Username = "the user name"
connection.Password = "the password"
connection.Authority = "ntlmdomain:the domain name"
Dim scope As New ManagementScope("\\the ip
address\root\CIMV2", connection)

scope.Connect()

Dim query As New ObjectQuery( _
"SELECT * FROM Win32_UTCTime")

Dim searcher As New ManagementObjectSearcher(scope, query)

For Each queryObj As ManagementObject In searcher.Get()

Console.WriteLine("-----------------------------------")
Console.WriteLine("Win32_UTCTime instance")
Console.WriteLine("-----------------------------------")
Console.WriteLine("DayOfWeek: {0}",
queryObj("DayOfWeek"))
Next

Close()
Catch err As ManagementException
MessageBox.Show("An error occurred while querying for WMI
data: " & err.Message)
Catch unauthorizedErr As System.UnauthorizedAccessException

MessageBox.Show("Connection error (user name or password
might be incorrect): " & unauthorizedErr.Message)
End Try
End Sub

William Cruz

*** Sent via Developersdex http://www.developersdex.com ***

May 2 '07 #2

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

Similar topics

3
by: Alan Howard | last post by:
Hi there, I can't seem to find any info on this error message that's generated when sending email with CDO: "The pickup directory path is required and was not specified" Does anyone know...
2
by: CLEAR-RCIC | last post by:
Hello All, I wrote a .dll that programatically maps two network drives and copies files from one drive to the other. The .dll works fine when using an .exe to call the .dll. When I call the...
1
by: Brad | last post by:
I'm trying to use Active Directory to retrieve information for a user...for display purposes.. I am not using windows authentication or impersonation....I am using a fixed user id and password for...
0
by: Thomas | last post by:
the webpages on our .net server ran fine for almost a year now. in the last few weeks however, more and more occurences of the error "the compiler failed with error code 128" have shown up, despite...
5
by: lds | last post by:
I am getting the following error: The "SendUsing" configuration value is invalid. Description: An unhandled exception occurred during the execution of the current web request. Please review the...
9
by: Martin Eyles | last post by:
Hi, I have set up an asp.net website on another PC in order to test it. The site was fine on my PC, but on the new PC all the pages give the error "The Page Cannot Be Found". Some legacy pages...
4
farooqbob
by: farooqbob | last post by:
When i sending a HTML mail I getting this Erro "could not access "CDO.Message" object" How can i fix this problem
0
by: Curious | last post by:
Hi, I'm not sure if this is the right place to post such command issues. If you know a better forum where people respond to messages fairly often, please let me know! Anyway, would appreciate...
2
by: TC | last post by:
I installed an ASP.NET application on my web server, but it doesn't work. When I browse to a page, I get an error message. The message doesn't say much, but it does tell me: An error message...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.