Hello,
I've an .exe program that takes 2 arguments at the start. When I create a shortcut to this program and add these 2 arguments to the target it works fine. But when I try to run this program with the same arguments directly on the source target it doesn't work, the arguments are not taken into account.
Source target: "C:\Program Files (x86)\test\Test.exe"
Shortcut: "C:\Program Files (x86)\Test.exe.lnk" /a2 87549
The program "Test.exe" starts by clicking on the "Start Program" button.
Code :
Can I even do what i'm trying to do? (Windows 10 64bits, .NET Framework 4.7.2, Windows Form).
Thank you for your help.
I've an .exe program that takes 2 arguments at the start. When I create a shortcut to this program and add these 2 arguments to the target it works fine. But when I try to run this program with the same arguments directly on the source target it doesn't work, the arguments are not taken into account.
Source target: "C:\Program Files (x86)\test\Test.exe"
Shortcut: "C:\Program Files (x86)\Test.exe.lnk" /a2 87549
The program "Test.exe" starts by clicking on the "Start Program" button.
Code :
C#:
/*--------- TARGET SOURCE CODE (DOESN'T WORKS) ----------*/
string fileName = @"C:\Program Files (x86)\Test\Test.exe";
ProcessStartInfo startInfo = new ProcessStartInfo(fileName);
startInfo.Arguments = "/a2 87549";
Process proc = Process.Start(startInfo);
/*--------- SHORTCUT CODE (WORKS) ----------*/
string fileName = @"C:\Program Files (x86)\Test.exe.lnk";
ProcessStartInfo startInfo = new ProcessStartInfo(fileName);
startInfo.Arguments = "/a2 87549";
Process proc = Process.Start(startInfo);
Can I even do what i'm trying to do? (Windows 10 64bits, .NET Framework 4.7.2, Windows Form).
Thank you for your help.