zachvaldez
asked on
calling an exe with arguments
How do I run an exe with arguments added at teh end of it.
Im using this
System.Diagnostics.Process .Start("C: \Execute\F ile_Fixer. exe " & Label9.Text)
with Label9.text having value of "$xps"
In the folder C:\Execute , I have only File_Fixer.exe .
Is there an approach to carry this out?
Im using this
System.Diagnostics.Process
with Label9.text having value of "$xps"
In the folder C:\Execute , I have only File_Fixer.exe .
Is there an approach to carry this out?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, that was an excellent article.
What Im trying to do which I did not see how to implement in the article..
In order to accomplish my objective, I need to append command arguments after the exe such that
File_Fixer.exe $xps
because without the extension , I will not get the desired result.
Maybe you can point out where.
What Im trying to do which I did not see how to implement in the article..
In order to accomplish my objective, I need to append command arguments after the exe such that
File_Fixer.exe $xps
because without the extension , I will not get the desired result.
Maybe you can point out where.
sorry but I don't understand what you want. Can you rephrase it? Which error are you getting with your code?
ASKER
thanks,
Essentially
System.Diagnostics.Process .Start("C: \Execute\F ile_Fixer. exe", Label9.Text)
is same as
Dim MyProcess As New Process
MyProcess.StartInfo.FileNa me = "File_Fixer.exe"
MyProcess.StartInfo.Workin gDirectory = "C:\Execute\"
MyProcess.StartInfo.Argume nts = Label9.Text
MyProcess.Start()
Essentially
System.Diagnostics.Process
is same as
Dim MyProcess As New Process
MyProcess.StartInfo.FileNa
MyProcess.StartInfo.Workin
MyProcess.StartInfo.Argume
MyProcess.Start()
and what is the problem you have with it?
ASKER
I prefer your process because more options offered.
ASKER