Is there a way to launch an application through a shortcut from a C # application?
I am trying to run .lnk from my C # application. The shortcut contains a significant number of arguments, which I would prefer that the application not be remembered.
Attempting to launch a shortcut through Process.Start throws an exception.
thanks
EDIT:
The exception is "Win32Exception": "The specified executable is not a valid Win32 application."
Here is the (abbreviated) code:
ProcessStartInfo info = new ProcessStartInfo ( "example.lnk" ); info.CreateNoWindow = true; info.UseShellExecute = false; info.RedirectStandardError = true; info.RedirectStandardOutput = true; info.RedirectStandardInput = true; Process whatever = Process.Start( info );
user664939
source share