Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pre-logon message via registry 1

Status
Not open for further replies.

aich69

Technical User
Apr 23, 2004
588
GB
Not sure this in the right forum but can't find one for reg editing (feel free to abuse for posting in wrong forum, just make sure you tell me which one it should have gone in [smile]

We have a pre-logon message that has to be ok'd before a user can proceed to logon. Recently the message has been changed and is now 4 paragraphs long.

I can't for the life of me work out how to get line breaks between the paragraphs. Although they show in the code (for obvious reasons) the text shows as one big block on screen. Any ideas anyone? Below is the code of the reg file.

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies
\system]
"dontdisplaylastusername"=dword:00000000
"legalnoticecaption"="IMPORTANT - COMPUTER MISUSE ACT 1990"
"legalnoticetext"="This computer is owned by Whoever LTD and intended for use 
only by authorized individuals. Unauthorized access to, or misuse of this computer,  the 
information it holds and any interconnected ITC resources is prohibited and constitutes 
an offence under the Computer Misuse Act 1990.

By logging in to and using this computer, you acknowledge that you are a Whoever
LTD employee or authorized sub-contractor with an assigned Whoever user account 
and that you are aware of and consent to the following terms and conditions of use. 

Any or all activity may be monitored and recorded by Whoever LTD and such 
records may be used to investigate any suspected misuse or other violations of Whoever LTD Acceptable Use of ITC Policy, and may be disclosed to third parties, 
including law enforcement agencies. 

All Whoever ITC resources are provided for corporate use and you should have no 
expectation of privacy of personal information in your use of this system. 

Unless specifically marked otherwise, information held on this computer is for for 
internal company use only and must not be disclosed to unauthorized recipients.  Any 
violation of the above, may result in disciplinary and/or legal action."
"shutdownwithoutlogon"=dword:00000001
"undockwithoutlogon"=dword:00000001
"disablecad"=dword:00000000

I used to have a handle on life... but it broke. Cpt. Red Bull
 
If you use Group Policy to enter the message rather than doing it directly into the Registry, does the paragraphing work?

computer config / windows settings / security settings / local policies /
security options / "interactive logon: message text..." and "message title..."


If you are copying and pasting from Notepad into the Registry, does it make any difference if you use Word Wrap, or don't use it, in the final displayed message?

Experts-Exchange is a private forum (which you have to join to read the answers, but they do have a free trial) and there was mention of a VBScript to circumvent this problem as it applies to the actual length of the message. You might like to look at it?

Or you could try your luck at the VBScript forum here.
 
agreed...direct registry writes to perform the functions that a gpo has natively are only very loosely supported. I can guarantee MS would tell you to use policy then hang up :)

-Brandon Wilson
MCSE00/03, MCSA:Messaging00, MCSA03, A+

 
well, as it turns out, getting line breaks (where you want them) seems to elude even entries via gp.

regardless of how you enter the text, whether directly or copy/paste from a text file, the formatting is lost the minute it goes into a reg string or gpo

linney going to look into the VB option, but not sure it's going to be viable in our situation. Tried everything in the way of direct input and copy/paste - word wrap/no word wrap but no luck...

thanks, as ever, for the input

I used to have a handle on life... but it broke. Cpt. Red Bull
 
Not sure if it will work, but you can try to use the actual line break characters in your text see if they will breka up the paragraphs.

Widows uses "\r\n" as line breaks, so try adding those where you want to break paragraphs.

Maybe not the nicest of solutions but...



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
tried those and unfortunately they just get diaplayed as \r & \n... really thought I was on a winner when I tried too.
believe it or not we even stooped as far as trying <br> (at this point we really were clutching at some very serious straws [wink])

good call though... cheers

I used to have a handle on life... but it broke. Cpt. Red Bull
 
Just for kicks, have you tried the old and venerable terminal linefeed/CR command? e.g. CTRL+M

Ben

"If it works don't fix it! If it doesn't use a sledgehammer..."
 
BigBadBen... not tried that but will give it a go on Monday when I get back in to the office. Got to have this pushed out across the whole estate by end of next week so I'll try anything [wink] Cheers

I used to have a handle on life... but it broke. Cpt. Red Bull
 
At first glance that looks pretty cool. Headng out but going to check it out fully later. Nice one, cheers [smile]

I used to have a handle on life... but it broke. Cpt. Red Bull
 
the line break thing is by design....youd have to rewrite the dll....or tie another into the current...so on and so forth...
it differed between windows 2000 and windows xp/2003 as far as how the syntax is. The syntax is determined by windows, and no matter what you try, it won't be formatted how you wish it to be. It's meant to just be a text notification, and not something for alteration to look "fancy", so to speak. The reason for the 2k and 2k3/xp difference is due to a problem where I believe it was commas, that would cause a premature line break, causing some very strange notifications to appear :)

-Brandon Wilson
MCSE00/03, MCSA:Messaging00, MCSA03, A+

 
If it becomes desperate, perhaps you can make a image (photo) of the text and nicely displayed paragraphs and run it as a startup program or schedule it to run at login, perhaps a login script?

The user would have to close the displayed window via an "x" rather than clicking OK.
 
well... after all the great input from you guys it has been decided that we will run with the 'one big block of text' registry entry as this is what our admins in a foreign land can deal with.

cheers everyone... some very valid points made.

I used to have a handle on life... but it broke. Cpt. Red Bull
 
Well, you can always use the cheesy-a$$ solution I use for forums and the like when they won't do the line spacing the way i want them....

Four score and seven years ago blah blah blah
rattle rattle klatter klatter boom boom boom.
.
This is my next paragraph
and it goes on like this.
.
For each new paragraph you want....

The period is the only way I could find in some cases to force the almost appearance of a blank line.... It's cheesy, but it gives a general impression of a space. I don't know if it will work in your case, but it never hurts to try.


 
thanks donb01... I will give it a go tomorrow, certainly worth a try and a handful of browny points (star for your self) if I get this working at the final hour...

will let you know [smile]

I used to have a handle on life... but it broke. Cpt. Red Bull
 
nope, didn't work for me unfortunately... and if I'd have been on the ball yesterday I would have realised as I had already inserted periods...

nevermind, thanks for trying... we will have to stick with functional and not 'pretty'

thanks again All

I used to have a handle on life... but it broke. Cpt. Red Bull
 
it seems like i remember entering either semi-colons (maybe double), or double commas, may create a line break/return in the message. I believe it was a bug that allowed this though (the same I spoke of earlier I think)...may be worth a shot, as I'm not sure it was fixed (admittedly, it likely was)...

-Brandon Wilson
MCSE00/03, MCSA:Messaging00, MCSA03, A+

 
Just out of curiosity, what happens if you add a line of spaces between each paragragh? Fill a line or maybe even two. Or does the registry simply remove spaces???
 
No they should remain. The problem therein lays with getting the proper spacing, since the only way to tell is to take a guess, then apply policy and check, then rinse and repeat.

-Brandon Wilson
MCSE00/03, MCSA:Messaging00, MCSA03, A+

 
-----CRACKED IT-------

To cut a long (day) story short...

Created the registry entry that gave me the block of 'unformatted' text but replaced the text string with a hex string.

the equivalent entry in hex for a carriage return is 00,0d,00,0a

I used to have a handle on life... but it broke. Cpt. Red Bull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top