Esempio n. 1
0
        /// <summary>
        /// Creates a new process on the specified desktop.
        /// </summary>
        /// <param name="path">Path to application.</param>
        /// <param name="desktop">Desktop name.</param>
        /// <returns>A Process object for the newly created process, otherwise, null.</returns>
        public static Process CreateProcess(string path, string desktop)
        {
            if (!Desktop.Exists(desktop))
            {
                return(null);
            }

            // create the process.
            Desktop d = Desktop.OpenDesktop(desktop);

            return(d.CreateProcess(path));
        }
Esempio n. 2
0
 /// <summary>
 /// Opens the default desktop.
 /// </summary>
 /// <returns>If successful, a Desktop object, otherwise, null.</returns>
 public static Desktop OpenDefaultDesktop()
 {
     // opens the default desktop.
     return(Desktop.OpenDesktop("Default"));
 }