Regarding Process execution
Hi
I have to execute a batch file and it produces a lot of info on the command line. I have to get all those info in a txt file. How to accomplish this in VB .NET?
In vc++, I've been creating a process with read and write pipes and reading the contents into a txt file.
I've to do a similar thing in VB .NET. Can anyone help me with this?
Regards,
Bharani..
Re: Regarding Process execution
Re: Regarding Process execution
Hi
The example is nice and it works fine. But this is not what i need.
I have a CM tool with me. Dimensions. And I can connect it through command line
Code:
dmcli -file filename -param paramfile
And in my vc++ approach, I used to get the things the dimensions command mode used to throw me. But here I get only the codes which the windows commandline throw!
Regards
Bharani
Re: Regarding Process execution
I have no idea what you mean.
Re: Regarding Process execution
Sorry.. i dont get thro the code fully ;) .. it nice
thnx
Bharani..
Re: Regarding Process execution
Hi
Here if i create five threads, they run parallely. What should i have to do if the threads should execute one after another?
thnx,
bharani..
Re: Regarding Process execution
Quote:
Originally Posted by ajbharani
Hi
Here if i create five threads, they run parallely. What should i have to do if the threads should execute one after another?
thnx,
bharani..
What i mean is
if i write a code like this,
Code:
ExecuteProcess("prc.bat")
msgbox("hello")
the msgbox should be displayed only after the process completes its execution
regards,
bharani
Re: Regarding Process execution
Try this:
dim process as new Process
process.StartInfo.FileName ="prc.bat"
process.start
process.WaitForExit()
Thread.Sleep(1000)
msgbox("hello")
Re: Regarding Process execution
Hi
I did like this
Code:
waitdlg.show()
dim process as new process
process.StartInfo.FileName="prc.bat"
process.start
process.WaitForExit()
waitdlg.hide()
I expect a dialog to appear saying "please wait" as its label. Once the process ends, the dialog should disappear. I do get the dialog. But the dialog is not completely painted. I get a partial one. How can I solve this problem?
Regards,
Bharani..
Re: Regarding Process execution
Create a form with the same message as in dialog box. Show it and through form.visible = true and make it disappear with form.visible = false command instead of the dialog.wait - this is an alternative.