C# windows service,该怎么解决

C# windows service
我想用windows service来自动开启winform应用程序
                    Process proc = new Process();
                    Process[] app = Process.GetProcessesByName("WindowsFormsApplication4");
                    if (app != null && app.Length != 0)
                    {
                        for (int i = 0; i < app.Length; i++)
                        {
                            app[i].Kill();
                        }
                    }
                    else
                    {
                        proc.StartInfo.FileName = GetParameterValue("startPath");//启动路径
                        proc.Start();
                    }
问题是应用程序已经启动了,进程也有了。但是winform窗体没有弹出来,我试过用其它的方式打开是有效的。求解
------解决方案--------------------
总之,在服务里开启的程序,你也把它当成服务来运行就行了.
------解决方案--------------------
服务本身就是没有窗口的,你用ProcessStart启动的进程,默认是以服务进程的会话令牌开启的,自然也是没有窗口的
给你一个兼容XP/Win7/Win8/2008的吧

需要注意的是,在Win8的Session隔离下,使用API   WTSGetConsoleSessionId()获取的不一定是活动用户的sessionID了
要通过枚举找出来,其中跟踪日志的方法自己改掉

使用方法
int? sessonId = GetActiveSessionId();
//如果已有用户登陆(
if(sessionId.HasValue)
{
        CreateProcess(sessionid, exe完整路径, 启动参数);
}


//sessionId是用户的会话ID,默认为当前活动用户;appFullName是程序完整路径,args是启动参数
public static bool CreateProcess(int sessionId, string appFullName, string args)
        {
            if (!System.IO.File.Exists(appFullName))
            {
                throw new System.IO.FileNotFoundException(appFullName);
            }
            bool sucess = false;
            IntPtr hToken = IntPtr.Zero,
                   hDupedToken = IntPtr.Zero,
                   lpEnvironment = IntPtr.Zero;
            Mapper.Process_Information pi = new Mapper.Process_Information();
            Mapper.SecurityAttributes sa;
            try
            {
                //获取指定会话的用户令牌,须具备System权限
                sucess = Mapper.WTSQueryUserToken(sessionId, out hToken);
                if(!sucess)
                {
                    //服务程序中,获取指定会话的桌面进程
                    var explorer = Process.GetProcesses()
                        .FirstOrDefault(p => p.SessionId == sessionId && string.Equals(p.ProcessName, Setting.ExplorerProcess, StringComparison.OrdinalIgnoreCase));
                    if (explorer == null)