473,898 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Time limit on ManagementScope .Connect?

Hello, is there a way to limit the time a "ManagementScop e.Connect"
execution takes to end before it times out by itself? I tried using
ConnectionOptio ns.TimeOut property to no avail.

I am trying with the code below to scan a group of computers, but there are
still a few computers that take way more than two seconds to time out.

Please, any help or pointers will be greatly appreciated.

Dim options As New ConnectionOptio ns
Dim query As ObjectQuery
Dim searcher As ManagementObjec tSearcher
Dim queryCollection As ManagementObjec tCollection
Dim m As ManagementObjec t
Dim scope As New ManagementScope ("\\" & oName & "\root\cimv 2", options)
scope.Options.T imeout = New TimeSpan(200000 00)
Catch ex As System.Unauthor izedAccessExcep tion
oMsg &= "Connect UnauthorizedAcc essException: " & ex.Message
Exit Sub
Catch ex As System.Runtime. InteropServices .COMException
oMsg &= "Connect COMException: " & ex.Message
Exit Sub
End Try


Oct 6 '08 #1
0 2436

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

Similar topics

by: PW | last post by:
Hi, I'm using WinXP-Pro, ASP classic, IIS 5.0. I regularly get this error, but I know I am the only user accessing the website at the time of the error. I looked it up on the MS support webiste. Their recommendation is this ... ------------------
by: Gary | last post by:
Hi, guys! Some of my applications are sharing same SQL login/password to connect to a database called "MyDB" on server "MyServer" . The password is encrypted and stored in registry or some configuration file the applications use. The applications use certain arithmetic to decrypt the password and then connect to MyDB. The problem is a few developers know the arithmetic. So virtually there is no security here.
by: toupeira23 | last post by:
Hello I'm trying to connect to another server via WMI, and it works just fine. But everytime it first tries to connect with the current user credentials, which naturally don't exist on the remote server, resulting in Failure Audit entries in the EventLog. After some googling I discovered that this is a known problem, but nobody has a workaround. So I thought I'd try again ;-) Here's some sample code to demonstrate the behaviour:
by: rdemyan via AccessMonster.com | last post by:
Is there a way to get the internet date/time. I saw an article that uses WinSock, but WinSock doesn't seem to be available in Access. I want to verify that the date/time on the local PC running my application is correct, so I was hoping I could get the Internet date/time. I understand that there is a NTP protocol to do this. Thanks. --
by: Adrian Dev | last post by:
Hi, I have succesfully used a ManagementScope object to get WMI information about workstations on the current domain using "//xp10/root/cimv1". But if I make a request to a workstation on a sub-domain, the command fails to connect with "Access denied". Do I need to alter the string somehow to include the sub domain name or could this be a rights issue ? Thanks in advance, Adrian
by: William Cruz | last post by:
Is there a way to get the current date / time on a remote PC? William *** Sent via Developersdex http://www.developersdex.com ***
by: desktop | last post by:
In the C++ standard sec 23.1.2 table 69 it says that erase(q) where q is a pointer to an element can be done in amortized constant time. I guess that is not worst case since std::set is practically a red-black tree where insert/delete takes O(lg n) time. Or are there some other explanation for this complexity?
by: =?Utf-8?B?YXVsZGg=?= | last post by:
i'm working with WMI and trying to collect a remote machine network shares. i recalled that this did work. but maybe a MS hotfix put an end to this. i cannot seem to get the remote machine data because of "accessdenied" error. i'm not sure what permissions, rights or policy i need to look at.. here is part of my code... public string getRemoteshares(string remotesystem) { //connecting to the remote computer being specified by the main
by: federico | last post by:
Hello, is there a way to limit the time a "ManagementScope.Connect" execution takes to end before it times out by itself? I tried using ConnectionOptions.TimeOut property to no avail. I am trying with the code below to scan a group of computers, but there are still a few computers that take way more than two seconds to time out. Please, any help or pointers will be greatly appreciated.
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.