E
Erik
Hi.
I got an old vb6-app that is going to be converted into C#. In the old
code the current program is starting another .exe with a command like:
If Shell("""" & "c:\Myapps\MyApp.exe" & """" & " " & Parameters,
vbNormalFocus) = 0 Then
........
Parameters is some parameters (a string with colon-separated arguments)
to be passed to the MyApp.exe.
So, now I translate this to:
ProcessStartInfo psi = new ProcessStartInfo();
psi.UseShellExecute = false; (I have tried with true here too)
psi.FileName = c:\Myapps\MyApp.exe;
psi.Arguments = Parameters;
psi.WindowStyle = ProcessWindowStyle.Normal;
Process.Start(psi);
And It almost is ok. The program is starting, but something in the
parameterlist seems to be wrong. Is there something I have missed here?
The """"-stuff in the old shell maybe is something I should take care
of, I cannot find any real information about this.
/Erik
I got an old vb6-app that is going to be converted into C#. In the old
code the current program is starting another .exe with a command like:
If Shell("""" & "c:\Myapps\MyApp.exe" & """" & " " & Parameters,
vbNormalFocus) = 0 Then
........
Parameters is some parameters (a string with colon-separated arguments)
to be passed to the MyApp.exe.
So, now I translate this to:
ProcessStartInfo psi = new ProcessStartInfo();
psi.UseShellExecute = false; (I have tried with true here too)
psi.FileName = c:\Myapps\MyApp.exe;
psi.Arguments = Parameters;
psi.WindowStyle = ProcessWindowStyle.Normal;
Process.Start(psi);
And It almost is ok. The program is starting, but something in the
parameterlist seems to be wrong. Is there something I have missed here?
The """"-stuff in the old shell maybe is something I should take care
of, I cannot find any real information about this.
/Erik