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

VB.NET shell execute and problem with few resources

have a big problem with this thread, after a long time iterations i get an
error message about few system
resources
Public Function Count1(ByVal iterations As Long) As Long
Dim objInfoProc As New ProcessStartInfo
Dim reg As Regex
Dim response As String = ""
Dim amatch As Match
Dim blnDomTrouv As Boolean = False
Dim i As Integer
Dim t As Thread = Thread.CurrentThread
Dim sr As System.IO.StreamReader
For i = 1 To iterations
Dim objProcess As System.Diagnostics.Process
objProcess = New System.Diagnostics.Process
objProcess.StartInfo.FileName = "nslookup.exe"
objProcess.StartInfo.UseShellExecute = False
objProcess.StartInfo.RedirectStandardOutput = True
objProcess.StartInfo.CreateNoWindow = True
objProcess.StartInfo.Arguments = " -querytype=any " & dominio(i)
& ".com"
objProcess.Start()
sr = objProcess.StandardOutput
objProcess.WaitForExit()
objProcess.Close()
reg = New Regex("nameserver = (?<server>[^\\\s]+)")
Do While (sr.Peek() > -1)
response = sr.ReadLine()
amatch = reg.Match(response)
If (amatch.Success) Then
pinga(i) = "X"
Exit Do
End If
Loop
objProcess.Dispose()
objProcess.Close()
objProcess = Nothing
reg = Nothing
Me.txtDisplay.Invoke(New ChangeTextControlDelegate(AddressOf
SetDisplayText), New Object() {t.Name, txtDisplay, i.ToString, 1})
Next
Me.txtDisplay.Invoke(New ChangeTextControlDelegate(AddressOf
SetDisplayText), New Object() {t.Name, txtDisplay, i.ToString, -9})
Return i
End Function
Oct 12 '05 #1
1 2853
Hi,
have a big problem with this thread, after a long time iterations i get an
error message about few system
resources


What does it say, by instance, "Should I format your disk (Y/N)?, than be
aware that you answer "N" and not "Y".

Or is the errormessage and your question something else?

:-)

Cor
Oct 13 '05 #2

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

Similar topics

0
by: Kyle | last post by:
To any who chose to provide an answer, or even any suggestions to this problem, I thank you greatly in advance. +200 pts. for any valid solutions. I am currently in the process of converting a...
0
by: Trips | last post by:
Hello Folks I have been having headache solving this and now I need your help I have developed an windows application which access network resources under differnt authenticated identity and...
4
by: Kartik | last post by:
Hi, I have an ASP.NET application using VB.NET.I am sending a DOS command to a machine on the network to print a file. This is achieved using xp_cmdshell Dim str As String = "xp_cmdshell...
3
by: David Eadie | last post by:
G'Day all, I cant for the God in me work out how to execute the following command line in vb.net: (watch for the word wrapping also) Sub(ByVal username As String) Shell("ECHO Y| cacls...
1
by: axxegfx | last post by:
have a big problem with this thread, after a long time iterations i get an error message about few system resources Public Function Count1(ByVal iterations As Long) As Long Dim objInfoProc As New...
10
by: A.M | last post by:
Hi, I am having difficulty with shell scripting in Python. I use the following command to run a DOS command and put the return value in a Python variable:
21
by: Tom Gur | last post by:
Hi, It's seems that csh and tcsh acts a bit different when handling special characters in quotes. i.e: if i'll supply my program with the following arguments: -winpath "c:\\temp\\" tcsh will...
25
by: dennijr | last post by:
ok, shell always used to be easy for me, now its starting to get annoying cause i dont know wats wrong heres the simplist code possible: Private Sub IExplorer_Click() a = Shell("C:\Program...
3
by: Max Vit | last post by:
I have come across a strange issue whilst trying to use a shell command call from Access and have spent some time trying to figure this out but can't find the cause as yet. The issue is: I need...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.