Trying to find a win32 process location and not just the name.
Can't seem to see any literature online about this?
Current Script is:
Process[] localByName = Process.GetProcessesByName("lmgrd_x64_n6");
foreach (Process proc in localByName)
{
try
{
try
{ //64bit
lb_instances.Items.Add(proc.MainModule.FileName + " " + proc.Id);
}
catch (Exception ex)
{ //32bit
lb_instances.Items.Add(proc.ProcessName + " " + proc.Id);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), ex.InnerException.ToString());
}
I get exception error:
A 32 bit processes cannot access modules of a 64 bit process.