Windows

Adding messages to Windows 7's logon screen

With a few simple registry tweaks, you can customize the Windows 7 logon screen to include a warning message and logon statistics. This illustrated walk-through shows you how.

If you are responsible for managing Windows 7 systems that are open to the public or have multiple user accounts, you may want to add a warning message to the logon screen. You may also want to display logon statistics on the logon screen. Fortunately, doing so is easily accomplished by tweaking a couple of existing registry settings and adding a new setting.

In this edition of the Windows Desktop Report, I'll show you how to delve into Windows 7's registry to make the appropriate changes.

Editing the registry

It is important to keep in mind that the registry is vital to the operating system and changing it can be dangerous if you inadvertently make a mistake. As such, you should take a few moments to back up your system by creating a Restore Point as well as by creating a system image in the Backup and Restore tool. That way if anything goes awry, you can restore your system and get right back to work.

To launch the Registry Editor, click the Start button, type Regedit in the Start Search box, and press [Enter]. When the UAC dialog box appears, respond appropriately.

Getting started

Once the Registry Editor launches, locate the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

From this key, shown in Figure A, you'll be able to make all the following changes to the Logon screen.

Figure A

From this key, you'll be able to make all the necessary changes to the Logon screen.

The warning message

The warning message that you'll add to the Windows 7's logon screen is actually made up of two parts: the title and the message text.

To add a title to the warning message, locate and double-click the legalnoticecaption value. When the Edit DWORD dialog box appears, type the title in the Value data text box, as shown in Figure B, and click OK. As you can see, for my example I chose to use a Welcome message, but you can essentially type anything that you want for your title. You can use up to 80 characters, including spaces, for the title.

Figure B

The legalnoticecaption value allows you to specify a title for your warning message.
To add the warning message, locate and double-click the legalnoticetext value. When the Edit DWORD dialog box appears, type the warning message in the Value data text box, as shown in Figure C, and click OK. As you can see, for my example, I chose to remind users of the rules in the lab. Again, you can essentially type anything that you want for your message text. You can use up to 16,383 characters, including spaces, for the message text. However, I have never needed to use that many characters for my messages.

Figure C

You can type a lot of text into the legalnoticetext value.

Tracking logons

If you want to be able to keep track of logons that were made on your system, you can configure the Logon screen to display logon statistics. Right-click anywhere inside the System key and select New| DWORD (32-bit) Value. When the new value appears, type DisplayLastLogonInfo and press Enter twice. When the Edit DWORD dialog box appears, simply type a 1 in the Value Data text box, as shown in Figure D, and click OK.

Figure D

If you want to be able to keep track of logons that were made on your system, set the DisplayLastLogonInfo value to 1.

The new logon display

Now when you restart your system and access the logon screen, you'll see the warning message, as shown in Figure E. Just click OK and you'll see your user icon and be able to continue with the logon operation.

Figure E

The warning message will appear on top of the logon screen.
When you select your user icon on the logon screen and type your password, you'll see the logon statistics, as shown in Figure F. Just click OK to complete the logon operation, and you will immediately see the desktop as you normally would.

Figure F

After you click your user icon, you'll see the logon statistics on the logon screen.

What's your take?

Are you likely to use these techniques to add a custom message to the logon screen in Windows 7? If so, what are your circumstances and reasoning for doing so? Will you do it for work or fun? As always, if you have comments or information to share about this topic, please take a moment to drop by the TechRepublic Community Forums and let us hear from you.

About

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

24 comments
syntap
syntap

Is there a way to customize the logon banner for a subset of clients in a single domain?  We have a situation where an organizational unit should have a different logon banner due to special security policy needs we want to make sure our users in that group there are aware of.  We want to keep them on the same domain though.  Is there a method (perhaps with a GPO?) where we keep our default login banner text for our domain users, but for a few specific client logons display a different login banner text?

langstons
langstons

Is there a way to adjust the font size also when making this setup color could be helpfull as well but I really need to adjust the size of the font to make it more readable.

DanMach
DanMach

As the only user of my machine I have not set a password. In changing the logon screen & adding a message, am I in danger of locking myself out ? Advice will be appreciated. regards, Dante

win7lover2010
win7lover2010

Adding my own message is a perfect way to tell a laptop thief that this laptop has a "No Jack" GPS device inside and that the authorities are right behind them. Could even add a number to contact no questions asked if found type of message. Anythings possible.

htamir5
htamir5

does someone knows how to display the computername in logon screen. it was possible on winXP and 2k3 on the GINA screen.

InvisibleBoss
InvisibleBoss

The first "message keys" mentioned in this article are allready present in Windows XP registry. You only have to add the "values". For those unfamiliar or uncomfortable with policy edit or "extra software", one can make various "messages" at these keys, and export each setting to a ".reg file". Then one can change the "message of the day/week" simply by running the reg-file at the actual computer(s). The alternatives can be made and saved at any computer, and distribute upon needs.

valsons
valsons

You can do the same exacty thing with a wonderful program called "Say the Time", and do after the login and while inside W7. THings like this seldom work for the normal intelligent and software smart user. I say forget it!!!!!

optiajessie
optiajessie

Hi guys, I carefully follow the steps above but i ain't get nothing on the screen like what was shown in Figure E. But yes, the Tracking Logon works and get the same result as shown in Figure F... Any idea that i should work on? Thanks, Jessie

Joanne Lowery
Joanne Lowery

Is it possible to generate paragraph "new lines" to start a sentence on a new line, rather than just generate a long string of characters?

brianzion
brianzion

because you cant use group policy in windows 7 home premium does/has anyone done this registry hack in home premium?

randall.cohen
randall.cohen

Take care when adding the "DisplayLastUserName" if "DontDisplayLastUserName",REG_DWORD,1 is already in place. This will prevent users from logging on stating that this has been disabled by your administrator

dduffy
dduffy

The biggest complaint I have is the background and the text color begin to blurr. How can the font be changed?

inventor96
inventor96

I was just thinking that you could use both of them together as a basic security tool: use the legal notice part for letting a user who started your machine know that any logins/offs are logged, and then you could use the last logon info as a reference; "Was that the last time I logged on to this machine or not ... ?"

Spitfire_Sysop
Spitfire_Sysop

You can change all of these options from Local Security Policy without using Regedit. http://technet.microsoft.com/en-us/library/cc772979(WS.10).aspx If you have a domain you can push these settings down with group policy in the same manner. The policy editors actually modify the registry for you so the end result is the same. I find the policy editor easier to use than digging through the registry.

randall.cohen
randall.cohen

Click on the "How do I log on to another domain?" link found under the password field.

Spitfire_Sysop
Spitfire_Sysop

That is exactly what group policy does. Using a start up script from a shared network location you have the same functionality on a home network outside of a domain!

Spitfire_Sysop
Spitfire_Sysop

I'm not sure what your point is. The logon message has a business and legal function. What does the users' intelligence have to do with the message you want to tell them before they log on?

Spitfire_Sysop
Spitfire_Sysop

Use the Local Security Policy editor. It's found in "Administrative Tools" in the control panel.

Spitfire_Sysop
Spitfire_Sysop

Yes. It has existed since the dawn of Windows and still exists in Win7. All of the same settings exist outside of a domain. The local security policy is in effect when you log on locally. Once you join a domain you use the rules that are pushed down from group policy but the local policy is still there. If you take your laptop home from work, for example, it will use the local security policy when off of the domain.

bigbugna
bigbugna

The regedit method work fine...

skooboy
skooboy

Do not enable the DisplayLastUserName if your Windows 7 Pro machine is part of an Active Directory domain! You will not be able to log back in to your computer. Instead you'll see the usual MS crap message "blah, blah...contact your Network Administrator". Before attempting this particular setting, be sure to set the username & password of an Administrative-level local user.

optiajessie
optiajessie

Hi Spitfire, Im sorry bout this but im not really good in system modifications so i really appreciate your help and support on how to do that. thanks, jessie

randall.cohen
randall.cohen

If you have not disabled remote registry editing, you can always connect to the remote computer and remove the offending entry.