在后台运行的服务或控制台应用程序?
创建在后台运行的服务或控制台应用程序?
我想创建一个每次启动时运行并像服务一样在后台运行的 .net 应用程序。我并不是想制作一个偷偷摸摸的应用程序或间谍软件,只是一个后台进程。
我对提供服务的担忧是用户必须知道如何第一次登录该服务并进行设置。如果该应用程序由很多人运行,则可能会失败很多次。
有没有一种简单的方法可以将当前用户作为服务的用户并自动设置服务?
或者
我可以创建一个控制台应用程序以及如何将其设置为透明吗?将其移动到启动文件夹并使其始终运行应该不难。我只是不希望用户在任务栏上看到它。
也许还有其他我没有想到的选择。简单就是最好的。
Create a service or console app that runs in the background?
I want to create a .net app that runs every time at startup and runs in the background like a service. I am not trying to make a sneaky app or spyware, just a background process.
My concern with making a service is users have to know how to log in to the service that first time and set it up. If the app were run by lot's of people that would probably fail many times.
Is there an easy way to just pass the current user as the user for the service and automatically set the servive up?
OR
Can I create a console app and some how set it to be transparent? Should not be difficult to move it to the start up folder and to make it run all the time. I just wouldn't want users to see it on the taskbar.
Maybe there is some other option I am not thinking of. Simple is best.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查此项以安装 Windows 服务。
我不认为我们可以使控制台应用程序透明,但是是的,您可以使 Windows 窗体透明。将不透明度设置为 0%,并将 ShowInTaskbar 属性设置为 false。还将可见性设置为隐藏。
我认为 Windows 服务选项很好。因为它被设计为作为后台应用程序运行。
Check this for installing Windows Service.
I don't think we can make console apps transparent, but yes you can make windows forms transparent. Set the opacity to 0% and ShowInTaskbar property to false. Also set the visibility to hidden.
I think the Windows service option is good. Because it is designed to run as background applications.