twophase.exe is a fortran program that I have written. I think what is giving me problems are the spaces in "Documents and Settings" and "Two Phase Flow". If I type C:\Documents and Settings\trojan\Desktop\Two Phase Flow\twophase.exe in a command shell, I get an error, I have to put it all in " " but somehow the Process Start or even the Shell command is not doing that. Know what I mean
Also if this is the current users desktop rather than hardcoding a path in there like that you can use the function to return the current path for the desktop.
Dim s As String = ControlChars.Quote & My.Computer.FileSystem.SpecialDirectories.Desktop & "\Two Flow App.exe" & ControlChars.Quote
Call to Dos Operating System
Matt_343
tody4
Hashim Ahmed
Process.Start will enable you to do this.
http://msdn2.microsoft.com/en-us/library/h6ak8zt5.aspx
An Example
' Run the Foo.bat passing in the path to a htm file.
Process.Start("WordPad", "C:\test.txt")
Obviously the path parameter here can be a variable or property from you Windows Application.
R.Tutus
so far this is what I have
Process.Start(
"C:\Documents and Settings\trojan\Desktop\Two Phase Flow\twophase.exe")This should work, I think, but it doesnt.
GethWho
Also if this is the current users desktop rather than hardcoding a path in there like that you can use the function to return the current path for the desktop.
Dim s As String = ControlChars.Quote & My.Computer.FileSystem.SpecialDirectories.Desktop & "\Two Flow App.exe" & ControlChars.QuoteProcess.Start(s
)There are a number of different special folders
http://windowssdk.msdn.microsoft.com/en-us/library/ms172972.aspx
ColinCJ
Um, is this post answered It sounds like you still have a problem, but the thread is marked answered.
Did you put the parameter in 'quotes' e.g """C:\test.txt"""