简体   繁体   English

如何添加基于时间的限制以防止Windows用户登录?

[英]How to add time based restrictions to prevent a Windows user from logging in?

I am trying to add some modification to the windows login screen that only allows a user to log in if they have time remaining for that day. 我正在尝试对Windows登录屏幕进行一些修改,仅允许用户在当天剩余时间登录的情况下进行登录。 I also want to allow them to increase the time via a connection with the wireless device. 我还希望允许他们通过与无线设备的连接来增加时间。

I have seen similar things done, with Asus Face Login, and Bluetooth login, and I would have no problem writing the code, but how do I put the restrictions at the login screen? 我已经看到使用Asus Face Login和Bluetooth登录完成了类似的操作,并且编写代码没有问题,但是如何在登录屏幕上设置限制?

Am I correct in the assumption that this can also only be done using C++? 我是否也只能使用C ++来完成这一假设? If so, I program mainly in java, so when environments would you recommend forC++? 如果是这样,我主要使用Java进行编程,那么何时推荐使用C ++?

Any suggestions and links to resources are appreciated! 任何建议和资源链接都表示赞赏! Thanks 谢谢

I am not pretty much sure but that can be done as follows: There is task scheduler in windows that gives user a feature to run a particular program at log on. 我不太确定,但是可以执行以下操作:Windows中有任务计划程序,该任务计划程序使用户可以在登录时运行特定程序。 So you can develop a program that will run at log on. 因此,您可以开发一个将在登录时运行的程序。

Program can be something like that: Firstly, it will get the current user, check for the time available with the user. 程序可以是这样的:首先,它将获取当前用户,检查该用户可用的时间。 This can be done by saving time spent by the user in internal database or file. 这可以通过节省用户在内部数据库或文件中花费的时间来完成。

If user has crossed the specified limit then it will write the details in file/database and fire system("Logoff") command. 如果用户已经超过了指定的限制,那么它将在文件/数据库中写入详细信息,并触发system(“ Logoff”)命令。 Logoff is windows command to logoff. 注销是用于注销的Windows命令。

Further on each successfull login it will keep the time of loging in and while logging off it will update the time difference in the file/database. 每次成功登录后,它将保留登录时间,而在注销时,将更新文件/数据库中的时差。

This is how I suppose it can be implemented. 我想这就是可以实现的方式。 If you have some better way please share. 如果您有更好的方法,请分享。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何防止基于编译时详细级别编译日志记录字符串? - How can I prevent a logging string being compiled based on a compile-time verbosity level? 如何防止工厂用户基于枚举调用错误的模板化或重载方法? - How could I prevent the factory user from calling the wrong templated or overloaded method based on enum? 如何基于C ++ Windows对话框的程序不时获取系统状态 - How a C++ windows dialog based program to get system a status from time to time 如何防止应用程序被固定在Windows 7中? - How to prevent an app from being pinned in Windows 7? 如何防止基于ASIO的服务器终止 - How to prevent ASIO based server from terminating 如何查看用户登录Windows的时间? - How to check the time that user has logged in to Windows? 如何衡量Windows进程使用的用户时间? - How to measure user time used by process on windows? 如何防止用户破坏对象 - How to prevent user from destroying an object Windows7内存管理 - 如何防止并发线程阻塞 - Windows7 memory management - how to prevent concurrent threads from blocking 如何防止Windows控制台上的回车键自动滚动 - How to prevent enter key on windows console from automatically scrolling
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM