Hi all
I'm literally begging for help here. I have a program that as part of other things, executes a batch file. In visual studio 2008,it works fine either either as debug or release. If I execute it fro the debug/release directories it works fine. if I copy the debug/release directory somewhere else, sdProc.Start() will not execute.
I'm copying it on the same drive. If I move the whole VS project directory it works. I just cant move the debug dir on it's own.
Any help appreciated. I'm just not able to debug the problem.
private void RunMacro(string MacroName)
{
//System.Diagnostics.Debugger.Break();
Process sdProc = new Process();
string strCmdLine = @"D:\" + MacroName + ".bat";
sdProc.StartInfo = new ProcessStartInfo("CMD.exe");
sdProc.StartInfo.Arguments = strCmdLine;
sdProc.Start();
sdProc.WaitForExit(132000);
sdProc.Close();
}