Add message to logon screen windows 7

半腔热情 提交于 2020-01-23 02:05:52

问题


I know that in windows 8, certain applications have a notification on the lock screen, and some fingerprint readers can add messages to the logon screen in windows 7 and older machines. Is it possible for a program to display a message on the logon screen for Windows 7 using c#? If so, can that message be dynamic?


回答1:


Yes it is possible to add/changes the logon screen message. It involves updating the legalnotiecaption and legalnoticetext values in the registry.

See this article for a detailed walkthrough: Display a Startup Message Box in Windows 8 It will work for Windows 7 also, since we are modifying the registry keys (which haven't changed between windows versions).

As for whether the message can be dynamic, I am not sure, since it comes from the registry. I guess you could write a C# app that stores the current / existing values for those 2 registry entries, then updates them at startup. (Don't forget to call Close() on the RegistryKey object in your C# code :)

Also, if you are "afraid" of modifying the registry entries directly, you can make the same changes by updating 2 options in the Local Security Policy. Behind the scenes, the 2 updates eventually update the same 2 registry keys - legalnotiecaption and legalnoticetext.

See: Create a logon message for users in Windows 7 | 8

  • Run secpol.msc and hit Enter to open the Local Security Policy
  • Expand Local Policies > Select Security options.
  • In the RHS pane, double click Interactive logon: Message title for users attempting to log on. Change and save it.
  • In the RHS pane, double click Interactive logon: Message text for users attempting to log on. Change and save it.


来源:https://stackoverflow.com/questions/21806822/add-message-to-logon-screen-windows-7

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