在ServiceExecute事件中是这样写的:
-------------------------------------------
Sleep(6000);
handle := FindWindow('Notepad',nil);
if handle = 0 then
   shellexecute(0, 'open', 'C:\WINDOWS\system32\notepad.exe' , nil, nil, sw_shownormal) ;
ServiceThread.ProcessRequests(False);
-------------------------------------------
但Notepad.exe的窗口不能显示出来呀,但在任务管理器的进程列表中都有,就在应用程序的列表中就没有呀? 本人第一次写服务启动另一程序,对window服务知道的有限,还请各位帮忙,谢谢.