我创建了一个WinForms应用程序,该应用程序由SYSTEM
用户下的计划任务启动。唯一的问题是它在后台运行。
是否可以在程序周围编写一个包装器以获取登录用户并将其带到桌面?
using System;
using System.Windows.Forms;
namespace ScheduledTaskTest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}