public static bool IsSprinterRunning()
{
RegistryKey key =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Hewlett-Packard\\Manual Runner\\Process");
if (key == null)
return false;
var arrayName = key.GetSubKeyNames();
if (arrayName.Length == 0)
return false;
foreach (string s in arrayName)
{
Process[] sprinterProcArray = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(s));
if (sprinterProcArray.Length != 0)
return true;
}
return false;
}