Hi All,
Need help urgently. I have the following code in my c# script:
foreach (System.Diagnostics.Process mBeforeExcelProc in mBeforeExcelProcs)
{
if (mBeforeExcelProc.ProcessName == "EXCEL")
{
mBeforeProcArray.Add(mBeforeExcelProc.Id.ToString());
}
}

It is giving the error mentioned in the title. It runs fine on windows2K, but give this access denied error in WindowsXP SP2. I am trying to capture all open .xls processes on the machine in the begining of the script, create an .xls spreadsheet and at the end close only this process, leaving all other .xls processes running.