I have a .net console app that launches excel. I have it working on my development enviornment, but I can't get it running on my production environment. When I try to run it I receive the following error "The system cannot execute the specified program". I have installed .net 2.0 sp2 on my production server. Any ideas?
Thank you,
Code
static void Main(string[] args)
{
DateTime priceDate;
bool runningForMidDay;
if (args.Length == 0)
{
priceDate = DateTime.Now;
runningForMidDay = false;
}
else
{
if (args[0].ToString() == "-?")
{
Console.WriteLine("This application...");
Console.ReadLine();
return;
}
if (!DateTime.TryParse(args[0].ToString(), out priceDate))
priceDate = DateTime.Now;
if (!bool.TryParse(args[1].ToString(), out runningForMidDay))
runningForMidDay = false;
}
if (runningForMidDay)
{ ... }
else
{ ... }
}