iControl.Utility.Configuration.LaunchProcess C# (CSharp) Method

LaunchProcess() public static method

public static LaunchProcess ( String sProgname ) : void
sProgname String
return void
        public static void LaunchProcess(String sProgname)
        {
            if ((null != sProgname) && (0 != sProgname.Length))
            {
                System.Diagnostics.Process proc = new System.Diagnostics.Process();
                if (sProgname.StartsWith("http"))
                {
                    proc.StartInfo.FileName = getDefaultBrowser();
                    proc.StartInfo.Arguments = sProgname;
                }
                else
                {
                    proc.StartInfo.FileName = sProgname;
                }
                try
                {
                    proc.Start();
                }
                catch(Exception e)
                {
                    MessageBox.Show(e.Message.ToString());
                }
            }
        }