Windows启动期间如何显示消息

aln_top

If you use a company-owned PC, you may have seen a legal notice displayed before you sign in to Windows. Here’s how you can do the same thing on your own PC and display a message with any text you want.

如果您使用公司拥有的PC,则在登录Windows之前可能已看到法律声明。 这是您可以在自己的PC上执行相同操作并显示带有所需任何文本的消息的方法。

If you’re willing to dive into the Windows Registry or Local Group Policy Editor, there are some interesting things you can do surrounding Windows sign in. We’ve talked about how to add previous sign in information to and hide your personal information from the Windows sign in screen. You can also add a text message that appears before a user signs in. Though it’s intended for companies to post legal notices, you can use it for anything you want. Here’s how.

如果您愿意使用Windows注册表或本地组策略编辑器,则可以对Windows登录进行一些有趣的操作。我们已经讨论了如何向Windows注册表中添加以前的登录信息隐藏您的个人信息 。 Windows登录屏幕。 您还可以添加一条在用户登录之前显示的文本消息。尽管该文本消息是供公司发布法律声明的,但您可以将其用于任何所需的操作。 这是如何做。

家庭用户:通过手动编辑注册表来显示启动文本消息 (Home Users: Display a Startup Text Message by Editing the Registry Manually)

If you have a Home edition of Windows, you will have to edit the Windows Registry to make these changes. You can also do it this way if you have Windows Pro or Enterprise, but just feel more comfortable working in the Registry. (If you have Pro or Enterprise, though, we recommend using the easier Local Group Policy Editor, as described in the next section.)

如果您有Windows的家庭版,则必须编辑Windows注册表才能进行这些更改。 如果您拥有Windows Pro或Enterprise,也可以通过这种方式进行操作,但是在注册表中工作会更自在。 (但是,如果您具有Pro或Enterprise,我们建议使用更简单的“本地组策略编辑器”,如下一节所述。)

Standard warning: Registry Editor is a powerful tool and misusing it can render your system unstable or even inoperable. This is a pretty simple hack and as long as you stick to the instructions, you shouldn’t have any problems. That said, if you’ve never worked with it before, consider reading about how to use the Registry Editor before you get started. And definitely back up the Registry (and your computer!) before making changes.

标准警告:注册表编辑器是一个功能强大的工具,滥用它会使您的系统不稳定甚至无法运行。 这是一个非常简单的技巧,只要您按照说明进行操作,就不会有任何问题。 也就是说,如果您以前从未使用过它,请在开始之前考虑阅读有关如何使用注册表编辑器的信息 。 并在进行更改之前一定要备份注册表 (和您的计算机 !)。

Open the Registry Editor by hitting Start and typing “regedit.” Press Enter to open Registry Editor and give it permission to make changes to your PC.

通过单击开始并键入“ regedit”来打开注册表编辑器。 按Enter键打开注册表编辑器,并授予其对PC进行更改的权限。

dcp_1

In the Registry Editor, use the left sidebar to navigate to the following key:

在注册表编辑器中,使用左侧边栏导航至以下键:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
aln_2

In the right-hand pane, you’ll see two values named legalnoticecaption and legalnoticetext. You’ll be editing both of these to create your message. Double-click the legalnoticecaption value to open its properties window.

在右侧窗格中,您将看到两个名为legalnoticecaptionlegalnoticetext值。 您将同时编辑这两者以创建您的消息。 双击legalnoticecaption值以打开其属性窗口。

aln_3

The legalnoticecaption value serves as the title of your message. It appears at the top and in a slightly larger font than the text of the message. Of course, if you only want a very short message, feel free to just use legalnoticecaption and leave legalnoticetext blank. In the “Value data” box, type the title of your message and then click “OK.”

legalnoticecaption值用作消息的标题。 它显示在顶部,并且字体比消息的文本稍大。 当然,如果您只想发送一条简短的消息,请随意使用legalnoticecaption并将legalnoticetextlegalnoticetext空白。 在“数值数据”框中,键入消息的标题,然后单击“确定”。

aln_4

Back in the main Registry Editor window, double-click the legalnoticetext value to open its properties window.

返回“注册表编辑器”主窗口,双击legalnoticetext值以打开其属性窗口。

aln_5

Type your message into the “Value data” box. You’ll notice that you only get a regular data box to type in here, which can make typing a longer message a little cumbersome. You can always type your message in a text editor like Notepad and then copy/paste it into the “Value data” box. You just want to keep in mind that there’s no formatting available, including carriage returns. So type all your text on one line before you copy and paste it.

在“数值数据”框中输入您的消息。 您会注意到,您只能在此处键入常规数据框,这会使键入较长的消息变得有些麻烦。 您始终可以在文本编辑器(如记事本)中键入消息,然后将其复制/粘贴到“值数据”框中。 您只需要记住,没有格式可用,包括回车符。 因此,在复制和粘贴文本之前,请将所有文本输入一行。

There is a way to insert carriage returns so that you can have multiple paragraphs, and we’ll be talking about that in a moment. But for now, just get your text in there and then click “OK.”

有一种插入回车符的方法,以便您可以有多个段落,我们稍后将讨论。 但就目前而言,只需在此处输入文字,然后单击“确定”即可。

aln_6

If you want to insert carriage returns into your text, you can do that right in Registry Editor. Select the legalnoticetext value, click the “Edit” menu, and then click “Modify Binary Data.”

如果要在文本中插入回车符,可以在注册表编辑器中直接执行。 选择legalnoticetext值,单击“编辑”菜单,然后单击“修改二进制数据”。

aln_7

In the binary editing window, each letter of the message (including spaces) is represented by four characters in hexadecimal. The regular text is shown out to the right; the hexadecimal characters on the left. To insert a carriage return, you’ll need to click the space on the hexadecimal side right after the character where you want to insert the return. You can try to eyeball the location, but you can also count to the location you need. One character of normal text is four characters on the binary side. So, count the number of characters in normal text, multiply that by four, and then count that number of binary characters to find the same spot.  It make take a couple of attempts to get the placement just where you want it.

在二进制编辑窗口中,消息的每个字母(包括空格)由四个十六进制字符表示。 常规文本显示在右侧。 左侧的十六进制字符。 要插入回车符,您需要在要插入回车符的字符后单击十六进制边上的空格。 您可以尝试查看该位置,但也可以指望您需要的位置。 普通文本的一个字符是二进制的四个字符。 因此,计算普通文本中的字符数,将其乘以四,然后计算该二进制字符数即可找到相同的位置。 您需要进行几次尝试才能将其放置在所需的位置。

After clicking the right space, type 0D00. This is the hexadecimal character for a carriage return. If you want to add an extra line between paragraphs, insert the 0D00 character twice in a row, as we’re doing in this example. Do this in each space where you want a return and then click “OK.”

单击右边的空间后,键入0D00。 这是回车的十六进制字符。 如果要在段落之间添加额外的行,请像在本示例中一样,在行中两次插入0D00字符。 在您要退货的每个空间中执行此操作,然后单击“确定”。

aln_8a

You can now exit Registry Editor. The next time restart Windows, you should see the legal notice before you reach the sign in screen.

您现在可以退出注册表编辑器。 下次重新启动Windows时,在到达登录屏幕之前,您应该看到法律声明。

aln_9

To reverse the changes, just fire up Registry Editor again, open the legalnoticecaption and legalnoticetext values in turn, and delete everything in the “Value data” box for both values.

要撤消更改,只需再次启动注册表编辑器,依次打开legalnoticecaptionlegalnoticetext值,然后删除“ Value data”框中的所有值。

下载我们的一键式注册表黑客 (Download Our One-Click Registry Hack)

aln_10

If you don’t feel like diving into the Registry yourself, we’ve created two downloadable registry hacks you can use. One hack adds a legal notice caption and text and the other removes them, restoring the default setting. Both hacks are included in the following ZIP file.

如果您不想自己进入注册表,我们创建了两个可供下载的注册表黑客。 一种hack会添加法律声明标题和文本,另一种则会删除它们,以恢复默认设置。 这两种黑客都包含在以下ZIP文件中。

Legal Notice Hacks

法律声明黑客

Before you can use the hack for adding the legal notice, you’ll need to edit the REG file to include your own text. After downloading and unzipping the hacks, right click the “Add Legal Notice to Startup.reg” file and choose “Edit” from the context menu.

您必须先编辑REG文件以包含您自己的文本,然后才能使用该hack添加法律声明。 下载并解压缩后,右键单击“将法律声明添加到Startup.reg”文件,然后从上下文菜单中选择“编辑”。

aln_11

Replace the text that says “Type Your Title Here” and “Type Your Text Here” with whatever you want. Just remember to leave the quotes in place. You’ll need to type the text for the legalnoticetext value all on one line. If you want to have text with multiple paragraphs and carriage returns in between paragraphs, you’ll have to add those in Registry Editor later using the technique we discussed in the previous section.

用任何您想要的内容替换“在这里键入您的标题”和“在这里键入您的文本”的文本。 只要记住将引号保留在适当的位置即可。 您需要在legalnoticetext全部输入legalnoticetext值的文本。 如果要使文本包含多个段落,并且段落之间有回车符,则稍后必须使用上一节中讨论的技术在注册表编辑器中添加这些内容。

aln_12

When you’re done making edits, save the REG file. You can then double-click the file and follow the prompts to add the material to the Registry.

完成编辑后,保存REG文件。 然后,您可以双击该文件,并按照提示将材料添加到注册表中。

These hacks are really just the System  key, stripped down to the legalnoticecaption and legalnoticetext values we described above, and then exported to a .REG file. Running the “Add Legal Notice to Startup” hack sets those values to use whatever text you entered into the file. Running the “Remove Legal Notice from Startup (Default)” hack sets both those values back to empty.  And if you enjoy fiddling with the Registry, it’s worth taking the time to learn how to make your own Registry hacks.

这些hack实际上只是System密钥,被简化为我们上面描述的legalnoticecaptionlegalnoticetext值,然后导出到.REG文件。 运行“向启动中添加法律声明” hack会将这些值设置为使用您在文件中输入的任何文本。 运行“从启动中删除法律声明(默认)” hack将这两个值都重新设置为空。 而且,如果您喜欢使用注册表,则值得花时间学习如何制作自己的注册表黑客

专业版和企业版用户:使用本地组策略编辑器显示启动文本消息 (Pro and Enterprise Users: Display a Startup Text Message with Local Group Policy Editor)

If you’re using Windows Pro or Enterprise, the easiest way to display a startup message is by using the Local Group Policy Editor. You should also be aware that group policy is a pretty powerful tool, so it’s worth taking some time to learn what it can do. And if you’re on a company network, do everyone a favor and check with your admin first. If your work computer is part of a domain, it’s also likely that it’s part of a domain group policy that will supersede the local group policy, anyway.

如果您使用的是Windows Pro或Enterprise,则显示启动消息的最简单方法是使用“本地组策略编辑器”。 您还应该意识到,组策略是一个非常强大的工具,因此值得花一些时间来学习它可以做什么 。 而且,如果您在公司网络中,请给所有人一个帮助,并首先与您的管理员联系。 如果您的工作计算机是域的一部分,则它也很可能是域组策略的一部分,无论如何,该组策略将取代本地组策略。

Open the regular Local Group Policy Editor instead by clicking Start, typing “gpedit.msc,” and then hitting Enter.

打开常规的本地组策略编辑器,而不是单击“开始”,键入“ gpedit.msc”,然后单击Enter。

wks_6

In the Local Group Policy Editor, on the left-hand side, drill down to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options.

在本地组策略编辑器的左侧,深入到“计算机配置”>“ Windows设置”>“安全设置”>“本地策略”>“安全选项”。

aln_13

On the right, find the “Interactive logon: Message title for users attempting to log on” setting and double-click it to open its properties window.

在右侧,找到“交互式登录:尝试登录的用户的邮件标题”设置,然后双击它以打开其属性窗口。

aln_14

In the setting’s properties window, type the title you want for your message and then click “OK.”

在设置的属性窗口中,键入您想要的消息标题,然后单击“确定”。

aln_15

Back in the Local Group Policy Editor main window, find the “Interactive logon: Message text for users attempting to log on” setting and double-click it to open its properties window.

返回本地组策略编辑器主窗口,找到“交互式登录:尝试登录的用户的消息文本”设置,然后双击它以打开其属性窗口。

aln_16

In the setting’s properties window, type the text you want for your message. Unlike when working directly in the Registry, you can separate text onto multiple lines by hitting Enter after a line to insert a carriage return. However, you can’t insert two carriage returns in a row to create a blank line between paragraphs. The edit box makes it look like you can, but the extra return won’t be recognized in the actual message during startup. If you do want to insert an extra blank line, you’ll have to modify the entry in the Registry using the technique we outlined previously.

在设置的属性窗口中,键入所需的消息文本。 与直接在注册表中工作不同,可以通过在一行后按Enter插入回车符来将文本分成多行。 但是,您不能在行中插入两个回车键以在段落之间创建空白行。 编辑框使其看起来像您可以的,但是在启动过程中,实际消息中不会识别出额外的回报。 如果确实要插入多余的空白行,则必须使用我们前面概述的技术来修改注册表中的条目。

When you’re done typing your message, click “OK.”

输入完消息后,单击“确定”。

aln_17

You can now exit the Local Group Policy Editor. The next time you restart Windows, you should see the legal notice before you reach the sign in screen. If you want to reverse the changes later, just go back to each of those two settings and remove all the text.

现在,您可以退出本地组策略编辑器。 下次重新启动Windows时,应该会看到法律声明,然后才能到达登录屏幕。 如果以后要撤消更改,只需返回到这两个设置中的每一个并删除所有文本。

翻译自: https://www.howtogeek.com/howto/15771/display-a-text-message-during-bootup-of-windows-7/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值