Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim p As New ProcessStartInfo
p.FileName = "D:\c\File_copy_program.exe"
p.Arguments = "D:\c\File_copy_program.exe" & "D:\PE.nrg" & "D:\c\1.nrg"
p.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(p)
End Sub
As you may see in the Above Code i am trying to run a program called File_copy_program.exe, which i created using C++. Now this program takes 3 Arguments in Main (i.e. program name, source file, target file).
Now the line: p.Arguments = "D:\c\File_copy_program.exe" & "D:\PE.nrg" & "D:\c\1.nrg"
is not working. And my program says invalid number of arguments passed (since i have a condition in it to make sure the program aborts if number of arguments are not equal to 3).
Arguementsshould not have the the program in it.