从服务启动的应用程序中显示对话框

时间:2022-08-27 12:16:14

I am in of a scenario where a .NET application needs to be launched from a windows service created in .NET (non interactive application though).

我的情况是需要从.NET创建的Windows服务(非交互式应用程序)启动.NET应用程序。

But finally a dialog is to be displayed from the application (NOT FROM SERVICE) for prompting the user that it is completed and some relevant details.

但最后会从应用程序(NOT FROM SERVICE)显示一个对话框,提示用户完成该操作并提供相关详细信息。

Will there be any problem if I use this approach ?

如果我使用这种方法会有任何问题吗?

1 个解决方案

#1


0  

By default, windows service works in an isolated session and does not have access to the desktop. I'd suggest you to start your desktop application on user logon, then interact with the service and show dialog on need.

默认情况下,Windows服务在隔离会话中工作,无法访问桌面。我建议您在用户登录时启动桌面应用程序,然后根据需要与服务进行交互并显示对话框。

#1


0  

By default, windows service works in an isolated session and does not have access to the desktop. I'd suggest you to start your desktop application on user logon, then interact with the service and show dialog on need.

默认情况下,Windows服务在隔离会话中工作,无法访问桌面。我建议您在用户登录时启动桌面应用程序,然后根据需要与服务进行交互并显示对话框。