I tried executing the instruction
in command prompt and it works fine.
But my requirement is to run the same from a console application in c#.
What I have tried:
I have tried implementing my requirements using console application in C# in Visual Studio.
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "RunDll32.exe";
startInfo.Arguments = "InetCpl.cpl,ResetIEtoDefaults";
process.StartInfo = startInfo;
The above piece of code didn't work. I tried in another way i.e.
string cmdInst = "RunDll32.exe InetCpl.cpl,ResetIEtoDefaults";
But this ended up with opening command prompt traversed to the present working directory.
Looking forward for the answers.