Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Process.Start with .WaitForExit()?

Status
Not open for further replies.

theCroat

Technical User
Sep 27, 2006
20
HR
Process.Start("executable.exe").WaitForExit() works fine

but when i'm trying Process.Start("executable file/index.fsh").WaitForExit()
which needs to start small dos operation i get error

just to let you know this executable file/index.fsh with .bat file works [test.bat]

and when i put Process.Start("test.bat").WaitForExit() it works for some reason!

I just dont know why i cant use "executable file/index.fsh" just like in vb6, or i dont know how to use it?

help?
 
forgot to mention i'm Visual Basic 2006 .net user
 
solved it

i need to use Process.Start"exe","/process -windows".WaitForExit

but, how do i HIDE this process? it shows as msdos function on top of my app :/
 
"forgot to mention i'm Visual Basic 2006 .net user"

Really ?? heh


I think there is a FAQ by ca8msm (?) that shows how to start a process. Also there is the option to have the windows hidden. Give it a search.
 
Err.. i cannot either find that FAQ. But I am sure it existed. Anyway:


Code:
        Dim psi As New System.Diagnostics.ProcessStartInfo
        psi.CreateNoWindow = False
        psi.WindowStyle = ProcessWindowStyle.Hidden
        psi.WorkingDirectory = "the directory"
        psi.FileName = "the filename"

        System.Diagnostics.Process.Start(psi)

        psi = Nothing

* Not tested /
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top