My question is not answered by the question When do we need to set UseShellExecute to True? If you think it is, please explain how?
I need to set the useshellexecute to true for my windows form application project before the application process start, but I can not find where in the project I have to make the change?
It's a windows form application project in visual studio 2015.
The main entry point for the application looks like this:
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
Where should I use ProcessStartInfo
and specify UseShellExecute
value?
EDIT: Big thank you to Matthew Watson who suggested I change the Environment CurrentDirectory which solved the issue! I will mark your anser as the correct one if you post it as an answer!