Click to See Complete Forum and Search --> : Regarding Process execution


ajbharani
February 9th, 2008, 02:45 AM
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..

jmcilhinney
February 9th, 2008, 03:17 AM
http://www.vbforums.com/showthread.php?t=381405

ajbharani
February 9th, 2008, 05:41 AM
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

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

jmcilhinney
February 9th, 2008, 07:25 PM
I have no idea what you mean.

ajbharani
February 10th, 2008, 02:24 AM
Sorry.. i dont get thro the code fully ;) .. it nice
thnx
Bharani..

ajbharani
February 11th, 2008, 04:18 AM
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..

ajbharani
February 11th, 2008, 04:26 AM
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,

ExecuteProcess("prc.bat")
msgbox("hello")


the msgbox should be displayed only after the process completes its execution

regards,
bharani

Gizmo001
February 12th, 2008, 11:27 AM
Try this:

dim process as new Process
process.StartInfo.FileName ="prc.bat"
process.start
process.WaitForExit()
Thread.Sleep(1000)
msgbox("hello")

ajbharani
February 12th, 2008, 11:13 PM
Hi
I did like this

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..

Gizmo001
February 13th, 2008, 09:22 AM
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.