在Windows登录屏幕之前运行我的c#应用程序 [英] Run my c# application before windows login screen

查看:84
本文介绍了在Windows登录屏幕之前运行我的c#应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,想在Windows登录屏幕之前运行它。像anty theft alarm

I have an application , and wan to run this before windows login screen . like anty theft alarm

推荐答案

这种应用程序称为Windows服务: http://en.wikipedia.org/wiki/Windows_service [ ^ ]。



如果从这里开始,你可以开发它们: http://msdn.microsoft.com/en-us/library/d56de412%28v=vs.110%29.aspx [< a href =http://msdn.microsoft.com/en-us/library/d56de412%28v=vs.110%29.aspxtarget =_ blanktitle =New Window> ^ ] 。



另见这篇演练文章: http://msdn.microsoft.com/en-us/library/zt39148a.aspx [ ^ ]。



此CodeProject文章c如果你想快速入手,也很有用:简单的Windows服务样本 [< a href =http://www.codeproject.com/Articles/3990/Simple-Windows-Service-Sampletarget =_ blanktitle =New Window> ^ ]。



-SA
Such kind of application is called "Windows Service": http://en.wikipedia.org/wiki/Windows_service[^].

You can develop them if you start here: http://msdn.microsoft.com/en-us/library/d56de412%28v=vs.110%29.aspx[^].

See also this walk-through article: http://msdn.microsoft.com/en-us/library/zt39148a.aspx[^].

This CodeProject article can also be useful, if you want some quick start: Simple Windows Service Sample[^].

—SA


我相信使用Windows任务计划程序以一种在计算机上运行的方式安排您的应用程序开始符合你的要求在Windows登录屏幕之前运行。



如何安排任务:http://windows.microsoft.com/en-US/windows7/schedule-a-task [ ^ ]



更具体地说,从该链接,您需要的是要根据常见的重复事件选择计划,请单击计算机启动时或何时登录,然后单击下一步。



另一种方式是使用Windows服务来实现它



使用C#创建基本Windows服务 [ ^ ]



这样一来,当计算机启动时,任务就会启动。但我建议玩任务调度程序来做任何你想做的事情。如果我对您的要求有更多了解,可能还有其他方法可以做你想要的(活动目录/域名),但据我所知......这应该做你需要的。
I believe scheduling your app using windows Task Scheduler in a way where it will run when the computer starts meets your requirement of "run this before windows login screen".

How to schedule a task: http://windows.microsoft.com/en-US/windows7/schedule-a-task[^]

More specifically from that link, what you will want is "To select a schedule based on common recurring events, click When the computer starts or When I log on, and then click Next."

The other way would be to do it using windows services

Creating a Basic Windows Service in C#[^]

So that way the task kicks off when the computer starts. But i would suggest playing around with the task scheduler to do whatever it is you are wanting to do. If i knew more about your requirement there may be other ways to do what you are wanting (Active directory/domain stuffs) but from what i know...this should do what you need.


有几种方法可以启动常规应用程序,例如从本地或域组策略中指定的启动脚本: http ://technet.microsoft.com/en-us/library/cc753404.aspx [ ^ ]。但是要注意,这里开始的东西不会与用户交互。



另一个更好的方法就是把这个任务变成一个窗口服务你的申请。实际上这是做到这一点的方法。从这里开始: http://msdn.microsoft.com/en-us/ library / zt39148a(v = vs.100).aspx [ ^ ]
There are several ways to start a regular application, like from startup script specified in local or domain group policy: http://technet.microsoft.com/en-us/library/cc753404.aspx[^]. But be aware, that something started here won''t interact with the user.

An other, much better approach fur such a task is to make a windows service out of your application. Actually this is the way to do it. Start here: http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.100).aspx[^]


这篇关于在Windows登录屏幕之前运行我的c#应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆