C# 当任何用户登录到系统时,如何使用windows服务在其会话中打开notepad.exe?
我想创建一个windows服务,当任何用户登录到系统时,该服务将自动将notepad.exe触发到他的用户会话中。使用此服务:C# 当任何用户登录到系统时,如何使用windows服务在其会话中打开notepad.exe?,c#,C#,我想创建一个windows服务,当任何用户登录到系统时,该服务将自动将notepad.exe触发到他的用户会话中。使用此服务: Process notePad = new Process(); notePad.StartInfo.FileName = "notepad.exe"; notePad.StartInfo.Arguments = "textFileToDisplay.txt"; notePad.Start(); 亲爱的,我已经试过你的代码,也试过CreateProcess函数的D
Process notePad = new Process();
notePad.StartInfo.FileName = "notepad.exe";
notePad.StartInfo.Arguments = "textFileToDisplay.txt";
notePad.Start();
亲爱的,我已经试过你的代码,也试过CreateProcess函数的DllImport,CreateProcessWithLogonW函数,还使用了Microsoft.Win32.TaskScheduler功能,但所有功能都不起作用。有人能解决我的问题吗。Windows服务在开发模式下打开记事本,但当我使用installUtil运行Windows服务时,它不会打开记事本。启动进程的服务不会显示GUI。记事本显示的是任务管理器