c# - 机器启动时运行exe

标签 c# .net windows

我已经在 .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/

相关文章:

c# - 接收消息队列消息而不从接收队列中读取它们?

c# - 无授权 header

c# - 如何使用 c# 卸载软件,方法是调用该软件的注册表文件中列出的 Software UninstallString 但进程不工作

windows - HH 的命令行选项和打开 CHM Windows 帮助文件

c# - 使用NAudio C#减少映射扬声器和麦克风音量的延迟

c# - .net core 2.0 Entity Framework 无限嵌套实体

c# - NSubstitute 错误 UnexpectedArgumentMatcherException

c# - 如何获取回收站目录?

c# - 如何返回一个空的 View 组件 MVC 6?

c# - 在 Windows Phone 8.1 上播放 GIF