Why not put it in its own thread, and then you will not care about how long it takes, since your program will still be responsive?
Reuben http://whatiseeinit.blogspot.com/ On 20 April 2012 02:53, Dennis Macdonald <[email protected]> wrote: > Hi, > > I have initiated a WMI query, see below; > > Dim searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * > FROM Win32_Product") > For Each queryObj As ManagementObject In searcher.Get() > ..... DO WORK HERE > Next > > How to I abort this Get call because it takes approx 60 seconds on my > comuter (I know the time will differ between computers) but I need to > be able to cancel it. > > Note, putting a exit look does not help because it does not enter the > loop until after the query has executed. > > > Any ideas? > > Thanks, > Dennis. > > -- > You received this message because you are subscribed to the Google > Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML > Web Services,.NET Remoting" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en > or visit the group website at http://megasolutions.net > -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net
