Hi All, %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 2008\VC\vcvarsall.bat"" x86
this is working fine, but is there a way to invoke the same using C# code.
I am using the following code
Process genrate = new Process();
string openVisCmd; openVisCmd = "%comspec% /k " + @"""""D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat""""" + " x86"; genrate.StartInfo.FileName = openVisCmd;
genrate.StartInfo.UseShellExecute = false;
genrate.StartInfo.RedirectStandardOutput = true;
genrate.StartInfo.RedirectStandardInput = true;
genrate.Start();
it is throwing "The system cannot find the file specified" exception. But when I use the same in windows + R, i am able to open visual studio command prompt.