diff --git a/PROMS/Volian.Base.Library/ExeInfo.cs b/PROMS/Volian.Base.Library/ExeInfo.cs new file mode 100644 index 00000000..f9170282 --- /dev/null +++ b/PROMS/Volian.Base.Library/ExeInfo.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Volian.Base.Library +{ + public static class ExeInfo + { + public static string GetROEditorPath() + { + //string roapp = Environment.GetEnvironmentVariable("roapp"); + // Get the current location of the PROMS executable and build a path to the RO Editor executable. + // the system call below return a path string with "file:\\" preceeding it. + string roapp = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); + if (roapp[7] == ':') // either a local drive or a mapped network drive + roapp = roapp.Substring(6); + else + roapp = @"\" + roapp.Substring(5); // non-mapped network drive - need to add extra back slash in front + roapp = roapp + @"\ROEDITOR.EXE"; + return roapp; + } + } +}