Example #1
0
        public static void LaunchApplication(DesktopApps application)
        {
            ProcessStartInfo psi = new ProcessStartInfo();

            psi.FileName = application.GetApplicationLocation();
            LaunchApplication(psi);
        }
Example #2
0
        public static string GetApplicationLocation(this DesktopApps deskApp)
        {
            switch (deskApp)
            {
            case DesktopApps.Calculator: return(@"C:\Windows\System32\calc.exe");

            case DesktopApps.Encompass: return(@"C:\SmartClientCache\Apps\Ellie Mae\Encompass\AppLauncher.exe");

            case DesktopApps.Firefox: return(@"C:\Program Files (x86)\Mozilla Firefox\firefox.exe");

            case DesktopApps.Jing: return(@"C:\Users\hcharls\Downloads\jing.exe");

            default: throw new Exception("The DesktopApps enum provided is not implemented!");
            }
        }