arep
I create this message in program:
Failure in AutoExtract for switch set to Monthly
System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at AutoExtract.AutoExtract.ProcessExtract(String msg)
at AutoExtract.AutoExtract.MonthlyExtract(String path)
at AutoExtract.AutoExtract.Main(String[] args)
Here is code for that method.
public static void ProcessExtract(string msg)
{
int retCode = 0;
//Run program
Process extProcess = new Process();
extProcess.StartInfo.FileName = executable;
Output_Files.PrintLog(extProcess.StartInfo.FileName);
extProcess.StartInfo.Arguments = runDate;
extProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
extProcess.StartInfo.CreateNoWindow = true;
extProcess.StartInfo.WorkingDirectory = path + "";
extProcess.Start();
extProcess.WaitForExit();
retCode = extProcess.ExitCode;
extProcess.Close();
extProcess.Dispose();
if (retCode != 0)
{
string message = "The " + name + " " + msg + " Extract Failed with a return code: " + retCode.ToString();
Exception ex = new Exception(message);
throw ex;
}
}
A RepaskyPosted Feb 3, 2013, 8:35 PM
Does someone know what to do to fix this.
I still get this when I recompiled the 2012 program in X86.
Thanks,
arep
System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at AutoExtract.AutoExtract.ProcessExtract(String msg)
at AutoExtract.AutoExtract.MonthlyExtract(String path)
at AutoExtract.AutoExtract.Main(String[] args)
A RepaskyPosted Jan 8, 2013, 2:34 PM
That goes before the Start, correct?
If so, I will recompile, but I will not be able to check it out until next month when it runs.
Thanks again,
arep
Santhosh Kumar JayaramanPosted Jan 8, 2013, 12:18 PM
extProcess.StartInfo.UseShellExecute=true;