C# Samples for Windows Parental Controls API

試著忘記壹切 提交于 2019-12-06 04:44:46

问题


Can anyone point me to some C# samples for the Windows Parental Controls API. I want to add some functionality that will allow a user to set the duration their child can be logged on in a day. I want to do this as a F/OSS app so that others can benefit from this too.

Cheers.


回答1:


An application like that already exists: LimitLogin.

Also you could use Limit User Logon Time (would be trivial in C#).

Parental Controls WMI Provider API + ManagementClass Class

Edit: To logout a user: ExitWindowsEx or commands (shutdown, PsShutdown, ...).




回答2:


It seems like there is no way to achieve this using the MS Windows SDK provided API and no c# samples to use as a reference. I tried this for Windows 7 and the only way to make this work is to set the blocked hours the first time someone logs in to the machine each day.



来源:https://stackoverflow.com/questions/3177333/c-sharp-samples-for-windows-parental-controls-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!