VB.NET, call executable with parameter macro
I have an application that uses a macro.
In this macro, I would like to call an external executable like this:
SYSTEM( "C:\Programme\Transform.exe" ,
"C:\Programme\Vectors.txt" ,
"C:\Programme\Vectors_Compensate.txt",
"C:\Programme\Vectors_Final.txt" )
This executable restores the modified file according to the template file. Finally, a new file is created.
Transform.exe open the form that sets the path for - Template file - Modified file - where you want to place the new recovery file.
After that you will click the "Start" button.
I would like that when calling this command line
SYSTEM( "C:\Programme\Transform.exe" ,
"C:\Programme\Vectors.txt" ,
"C:\Programme\Vectors_Compensate.txt",
"C:\Programme\Vectors_Final.txt" )
The parameter will go into place on the form.
How can i do this?
Thanks.
0
a source to share
1 answer
enter code here
I found him:
Dim cmdLine As String
Dim Parms() As String ' if the paramters are strings - declare this as necessary
cmdLine = Command$() ' Command$ would return "Parms1 Parms2 Parms3"
Parms = Split(cmdLine, " ")
'This section filled the form textbox.
TextBoxTemplate.Text = Parms(0)
TextBoxModify.Text = Parms(1)
TextBoxFinal.Text = Parms(2)
0
a source to share