Your best source of information and news about Vista hardware , windows and windows vista on the internet 你最好的信息来源和新闻关于Vista的硬件时, WindowsWindows Vista于互联网

Vista ARTICLES Vista的文章 TOP 50 50强 Vista VIDEOS Vista的影片 Vista SOFT Vista的软 Vista HELP Vista帮助

Formatting “Message text for users attempting to log on”格式化" ,正文为用户试图登录"


If you have ever tried defining the Security Options policy setting called: "Interactive logon: Message text for users attempting to log on" , you may have had some difficulties formatting the message the way you wanted it.如果您曾经试图界定安全选项策略设置被称为: "交互式登录:消息文本为用户试图登录" ,你可能有一些困难的格式化信息的方式,你想要它。 This blog is about "how to" workaround a minor bug in the GPEDIT tool…这个博客内容是"如何"变通一个小错误,在gpedit工具…

The issue: 问题:

First things first - the Group Policy setting is located here:首先第一件事-组策略的设置是在这里找到:

"Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\" "计算机配置\ Windows设置\安全设置\本地政策\安全选项\ "

The value is a Multi-String registry value that allows you to make multiple lines in the message.价值是一个多串登记价值,使你能够做出多线在口信。 The message pops up right after a users hits Ctrl+Alt+Del as a general warning to the user before actually logging on.信息弹出权后,用户点击按Ctrl + Alt + Del并作为一般性警告传达给用户之前其实登入网站。 But, unfortunately the formatting isn’t as perfect as it could be.但是,很可惜!格式化,是不是完美,因为它可以做到。

What happens is, that carriage returns are lost after formatting this "pre-logon message" with GPEDIT, imagine you would want a message like this (see Figure 3):会发生什么,即运载回报遗失后格式化这个"预先登录信息" ,与gpedit ,想象你会希望有一个讯息是这样的(见图3 ) :

—> -> "

I don’t know why this should be so hard? 我不知道为什么应该这样做很难吗? Jump next line please… 跳转下一行请…

Let’s do a comma, and continue the line… 让我们做一个逗号,并不断线…
Line number 4 is ready, but let’s jump line 5 & 6 now… 在线人数四是准备好,但让的跳转线五日及六日,现在…

Line 7 finishes up this story! 7号线完成了这个故事!

<— < -

Such a message would end up as (see Figure 5):这样的信息,最终会作为(见图5 ) :

—> -> "

I don’t know why this should be so hard? 我不知道为什么应该这样做很难吗? Jump next line please… 跳转下一行请…
Let’s do a comma, and continue the line… 让我们做一个逗号,并不断线…
Line number 4 is ready, but let’s jump line 5 & 6 now… 在线人数四是准备好,但让的跳转线五日及六日,现在…
Line 7 finishes up this story! 7号线完成了这个故事!

<— < -

So, basically the problem is: line feeds/carriage returns/empty lines disappear completely!所以,基本上,问题是: 线路饲料/运输效益/空线完全消失!

You can actually see this within the GPEDIT GUI, but only if you hit "Apply" before "OK" - if you just hit "OK" after typing in your message you cannot see that it’s actually changed by GPEDIT (so you think the formatting is working as it should).你可以看到,这与gpedit贵,但只有当你打"申请" ,在"好" -如果你只是击中"确定"后,输入你的讯息,你不能看到,它实际上改变了g pedit(让你觉得格式化是工作,因为它要) 。 I tested this behavior with GPEDIT on Windows XP SP2 (local policy), Windows Server 2003 SP1 (domain policy), Windows Vista SP Pre-RC (local policy) and Windows Server 2008 RC1 (domain policy).我测试了这种行为与gpedit对Windows XP SP2的(地方政策) , Windows Server 2003 SP1的(域名政策) , Windows Vista会sp前区局(地方政策)和Windows Server 2008年rc1 (域名政策) 。

Figure 1 - I typed in my message with the format I wanted:图1 -我打字,在我的讯息与格式,我想:
interf1

Figure 2 - I clicked Apply, and the formatting was changed:图2 -我按申请,并格式化改为:
interf2

If I had just click OK I wouldn’t have noticed the change - anyway it’sa bit annoying, right?如果我只是按一下确定,我就不会注意到这个变化-无论如何,这是有点恼人的,对不对?

Solution/Workaround: 解决方案/办法:

The solution I came up with is to modify the policy file directly/manually using Notepad.该解决方案我来了是要修改政策文件直接/手动使用记事本。 The file is located here:该文件的位置在这里:

"\\DOMAIN.local\SYSVOL\DOMAIN.local\Policies\{GPO-GUID}\MACHINE\Microsoft\Windows NT\SecEdit\GptTmpl.inf" " \ \ domain.local \ sysvol \ domain.local \政策\ (号-导) \机\微软\视窗NT \ secedit \ gpttmpl.inf "

Within that file we have the relevant registry value, called " LegalNoticeText":在这一文件,我们有相关的注册处的价值,所谓" legalnoticetext " :

MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\LegalNoticeText=7,I don’t know why this should be so hard? 机\软件\微软\窗户\ CurrentVersion以及\政策\系统\ legalnoticetext = 7 ,我不知道为什么应该这样做很难吗? Jump next line please…," ",Let’s do a comma"," and continue the line…,Line number 4 is ready"," but let’s jump line 5 & 6 now…," "," ",Line 7 finishes up this story! 跳转下一行请… , " " ,让我们做一个逗号" , "继续与该线… … ,电话号码,四愿" , "但是让我们跳转线5 & 6 ,现在… … , " " , " " , 7号线完成了这个故事!

Notice the " " (<quote><space><quote>) sequences, which are the same as empty lines.通知" , " ( <quote> <space> <quote> )序列,这是一样的空线。

This is the relevant line from a working GptTempl.inf file (the correct syntax written manually), and it actually works great:这是有关路线,从一个工作gpttempl.inf文件(正确的语法写手动) ,它实际上是很大的工程:

Figure 3 - Pre-logon message on a Windows Server 2003 SP1 Domain Controller:图3 -预先登录的信息,在W indowsS erver2 003S P1的域控制器:
interactivelogonmsg

Figure 4 - The above inserted GptTmpl.inf line also works for Windows XP SP2 in the same domain:图4 -上述插入g pttmpl.inf线工程,也适用于W indowsX PS P2中,在同一个域:
interactivelogonmsgxp

So, this proves that the INI file can actually be correctly formatted so clients (tested w/WS2003 SP1 and XP SP2 in a domain) can show the message perfectly.因此,这证明了INI文件其实是可以正确的格式化,使客户端(测试w/ws2003 SP1和XP SP2的在网域) ,可以显示讯息完美。 Please notice that the behavior is similar with local policies, but my testing has been focused on domain environments so far.请注意这种行为不仅是类似与地方政策,但我的测试一直侧重于域环境,让远。

If you try to modify the working policy setting using GPEDIT again - after changing just a tiny bit (or just hitting OK to an existing setting) within the GPO the formatting/syntax is ruined again unfortunately (when GPO is saved by GPEDIT)!如果你设法改变工作策略设置使用gpedit再次-在换了,只是点点(或只是打好,以现有的设置)内的G PO格式化/语法是毁了又可惜(邮政总局时,是救g pedit) ! Look here what came out of it when I tested it:看看这里有什么出来,它的时候,我试了它:

MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\LegalNoticeText=7,I don’t know why this should be so hard? 机\软件\微软\窗户\ CurrentVersion以及\政策\系统\ legalnoticetext = 7 ,我不知道为什么应该这样做很难吗? Jump next line please…,Let’s do a comma"," and continue the line…,Line number 4 is ready"," but let’s jump line 5 & 6 now…,Line 7 finishes up this story! 跳转下一行请… … ,让我们做一个逗号" , "继续与该线… … ,电话号码,四愿" , "但是让我们跳转线5 & 6 ,现在… … , 7号线完成了这个故事!

Notice the " " (<quote><space><quote>) sequences are gone!通知" , " ( <quote> <space> <quote> )序列的日子已经过去了! This gives a wrong result (no empty lines) when clients get the pre-logon message.这给人一个错误的结果(不空行)的时候,客户会在会前登陆的讯息。

Figure 5 - The formatting is lost (or wrong) when GPEDIT does the job:图5 -格式化丢失(或错误)当g pedit是否工作:
interf5

Please notice, if you’re testing this you will have to define an additional policy setting for it to work, namely the "Interactive logon: Message title for users attempting to log on" setting.请注意,如果您正在测试这个,你要定义一个额外的政策环境,以促进它的工作,即"交互式登录:消息标题为用户试图登录" ,确定。

Figure 6 - The title must be set for pre-logon message to appear图6 -标题必须设置为预先登录的讯息出现
interf6

Conclusion 结论

So, my conclusion is that (existing version of) GPEDIT doesn’t modify the GptTmpl.inf file properly (or the registry for local policies for that matter) - for this particular value at least… My best guess is that it doesn’t handle the quotes (") correctly, but I can’t be 100% sure. A bug report has been made for Microsoft - so hopefully it will be fixed before the final release of Windows Server 2008 and the Remote Server Administration Tools (RSAT).所以,我的结论是, (现行版) gpedit不修改gpttmpl.inf档案妥(或书记为地方政策,为这件事) -这个具有特殊价值至少… …我最乐观的估计是,它不处理引号( " ) ,正确,但我不能百分之百肯定。错误报告中已经取得了微软-但愿它会前确定最终发行的W indowsS erver2 008及远程服务器管理工具( r sat) 。

However, as mentioned you can make it work with a workaround like this: Just perform the GptTmpl.inf (below SYSVOL) editing manually, make a backup of the file when it’s perfect - and never touch that GPO with GPEDIT again… Until Microsoft releases an updated version of GPEDIT anyway.然而,正如你可以使这个工作,用变通方法是这样的:刚刚履行gpttmpl.inf (以下sysvol )编辑人手,使备份文件时,它的完善-并没有触及邮政总局表示,与g pedit再次…直到微软发布的最新版本gpedit反正。

Related KB articles out there:相关知识库文章有:
KB 330618 kb 330618
KB 238149 kb 238149
Technet article在TechNet文章

.

Popularity: 10%人气: 10 %


Written by Jakob H. Heidelberg. 写雅各布每小时海德堡。 Read more great feeds at is source 阅读更多伟大的饲料,是源头 WEBSITE 网站
no comments 没有评论 .
Read more articles on 查看更多文章 gpedit gpedit and sysvol sysvol and otherSoftware othersoftware and RSAT rsat and gpedit.msc gpedit.msc and group policies 组策略 and Group Policy 组策略 and Windows XP Windows XP中 and Security 安全 and Microsoft 微软 and Windows Server 2008 Windows服务器2008年 and Windows Server 2003 在Windows Server 2003 and Windows Vista Windows Vista中 .

Related articles相关文章

No comments没有评论

There are still no comments on this article.还有没有就此发表评论文章。

Leave your comment...留下您的评论...

If you want to leave your comment on this article, simply fill out the next form:如果你想离开你对此有何评论文章,仅需填写在下表:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> .你可以用这些方式XHTML标签: <a href="" ] <abbr ] <acronym ] < <blockquote cite=""> <code> <em> < i > <strike>复制。