?
Solved

Windows Registry Carriage Return

Posted on 2004-11-03
6
Medium Priority
?
2,347 Views
Last Modified: 2008-01-09
I have Win Xp machines as well some Win NT4 machines and I am trying to add carriage returns into the legalnoticetext.
On the XP machine I did a search and came up with a post that says for Win2k to edit the registry setting in binary and add
"0D000A00" however when doing so i simply get small boxes displayed.

There is obviously something i am doing wrong, is this different for XP or perhaps im just incorrectly adding it in. Can someone add some insight to this, possibly post an example?

Thanks in advance!

-Mike
0
Comment
Question by:mklaro
6 Comments
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 12483708
Typically, you need a carriage return + line feed in Windows.  Not sure it will work, but you could try adding the Line Feed.  When editing the registry.  Sorry I can't help beyond that.
0
 

Author Comment

by:mklaro
ID: 12484075
what would the entry be to add a line feed, im stumped with this...
0
 
LVL 3

Expert Comment

by:MBarber1957
ID: 12484327
Add a space to the end of your text, then type 0D000A00. The hex 0D (decimal 13) is a carriage return. The hex 0A (decimal 10) is a line feed.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Accepted Solution

by:
Longbow earned 1400 total points
ID: 12484689
http://support.microsoft.com/default.aspx?scid=kb;en-us;238149

each character have two pairs of values (space bar = 20 00)
you need to add 0D000A00 AFTER the 20 00
ie in Binary mode as explained in this link for the text "Line1Line2"

0000 4C 00 69 00 6E 00 65 00 L.i.n.e.
0008 31 00 4C 00 69 00 6E 00 1.L.i.n.
0010 65 00 32 00 00 00          e.2...

Compare the binary on the left and the text on the right :
The 1 of Line1 is 31 00
So add 0D000A00 after 31 00
it becomes 31 00 0D 00 0A 00
One carriage after Line2 wher 2 is 32 00
It becomes 32 00 0D 00 0A 00
0
 

Author Comment

by:mklaro
ID: 12484935
i got it thanks everyone
0
 
LVL 10

Expert Comment

by:Longbow
ID: 12492614
Dim WshShell, bKey
Set WshShell = WScript.CreateObject("WScript.Shell")

Title = "Title name"
Text = "Ligne0" & VbCrLf & "Ligne1" & VbCrLf & "Ligne2"

WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeCaption", Title, "REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeText", Text, "REG_SZ"

bkey = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeCaption")
bkey = bkey & VbCrLf & VbCrLf & WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeText")

WScript.Echo bkey

To automate the procedure on more computers you can put the above lines in a .vbs file.
Change the values between quotes in these two lines :
Title = "Title name"
Text = "Line0" & VbCrLf & "Line1" & VbCrLf & "Line2"

The three last lines of the script are just there to display the result.
You can delete them.

VbCrLf is the Carriage Return (0D000A00)

For NT machines you need "Windows Script 5.6 for Windows 98, Windows Millennium Edition, and Windows NT 4.0" :
http://www.microsoft.com/downloads/details.aspx?FamilyId=0A8A18F6-249C-4A72-BFCF-FC6AF26DC390&displaylang=en
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question