gpt4 book ai didi

c# - 机器启动时运行exe

转载 作者:可可西里 更新时间:2023-11-01 10:55:25 26 4
gpt4 key购买 nike

我已经在 .NET 中创建了一个 SMS 应用程序。
我希望应用程序应该在计算机启动时运行,甚至在用户登录之前。

就像 SQL Server 一样。

最佳答案

您需要将应用程序创建为 Windows Service .链接的 MSDN 页面将提供完整的详细信息。

Microsoft Windows services, formerly known as NT services, enable you to create long-running executable applications that run in their own Windows sessions. These services can be automatically started when the computer boots, can be paused and restarted, and do not show any user interface. These features make services ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer. You can also run services in the security context of a specific user account that is different from the logged-on user or the default computer account. For more information about services and Windows sessions, see the About Services section in the Platform SDK documentation in the MSDN Library.

关于c# - 机器启动时运行exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2317596/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com