Home All Groups Group Topic Archive Search About

How to Execute a cmd from a VB.net program

Author
7 Apr 2006 1:19 PM
Jason
In VB.net 03 is there a way to execute a external file such a
C:\windows\fyle.vbs and have the .net program should wait for the run cmd to
finish executing before going on with the rest of the programs.  similar to
..... WshShell.run "C:\windows\fyle.vbs",0,TRUE

Author
7 Apr 2006 1:41 PM
Alwin Büchner [FRANK]
Hey

Try this:
Dim Dir As New
IO.DirectoryInfo(System.Environment.GetFolderPath(Environment.SpecialFolder.System))

System.Diagnostics.Process.Start(Dir.Parent.FullName + "\explorer.exe '",
Application.StartupPath)

Alwin

Show quoteHide quote
"Jason" <some***@microsoft.com> schrieb im Newsbeitrag
news:uwLrrXkWGHA.924@TK2MSFTNGP03.phx.gbl...
> In VB.net 03 is there a way to execute a external file such a
> C:\windows\fyle.vbs and have the .net program should wait for the run cmd
> to finish executing before going on with the rest of the programs.
> similar to .... WshShell.run "C:\windows\fyle.vbs",0,TRUE
>