Hello,
The function that you would normally use to determine if an external application is running is:
System.Diagnostics.Process.GetProcessesByName("ProgramName")
This compiles, but throws an exception. I am guessing that it is some issue with windows7 security. If you get all of the processes and look at each one individually you would see some processes, but other would throw exceptions if you try to list their names.
The same code works properly when compiled by visual studio c#.
This is a test harness that will show you what i am talking about. Notice that not all of the processes are listed. Some processes that are even launched by you under your own account will generate an execption:
using UnityEngine;
using System.Collections;
public class test: MonoBehaviour {
// Use this for initialization
void Start () {
try
{
foreach (System.Diagnostics.Process p
in
System.Diagnostics.Process.GetProcesses())
{
try
{
print(p.ToString());
}catch(System.Exception e)
{
print("Mini exception when trying to list the name " + e);
}
}
}catch(System.Exception e)
{
print("Exception caught " + e);
}
}
// Update is called once per frame
void Update () {
}
}