diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 4f96a1c4..2b33b37a 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -1027,7 +1027,10 @@ namespace Volian.Controls.Library // launch equation editor string EqnEdt = GetEqnEdt(); if (EqnEdt == null) - MessageBox.Show("Equation Editor is not correctly configured in the registry.", "Warning", MessageBoxButtons.OK); + { + _MyLog.WarnFormat("Equation Editor is not correctly configured in the registry."); + MessageBox.Show("The Equation Editor needs to be started.", "Reminder", MessageBoxButtons.OK); + } else Process.Start(EqnEdt); _MyEditItem.AddChild((E_FromType)fromtype, contenttype); @@ -1051,6 +1054,17 @@ namespace Volian.Controls.Library } catch (Exception ex) { + string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); + folderPath += @"\Common Files\Microsoft Shared\EQUATION\EQNEDT32.EXE"; + System.IO.FileInfo fi = new System.IO.FileInfo(folderPath); + if (fi.Exists) return fi.FullName; + folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles).Replace(" (x86)", ""); + folderPath += @"\Common Files\Microsoft Shared\EQUATION\EQNEDT32.EXE"; + fi = new System.IO.FileInfo(folderPath); + if (fi.Exists) return fi.FullName; + folderPath = @"C:\Program Files\Common Files\Microsoft Shared\EQUATION\EQNEDT32.EXE"; + fi = new System.IO.FileInfo(folderPath); + if (fi.Exists) return fi.FullName; return null; } return retval;