We needed to expand our legal notice. We had one, but it was small and we wanted the legal notice to replace the hand signed user acknowledgments we’ve been keeping. I say we but they were probably perfectly fine doing this every year and keeping them filed away in a cabinet some where. I knew we could do better and I’m always looking for ways to improve things (i.e. stick my nose in and change things that would probably have been fine if left alone).
In any case, I set about the task of updating our legal notice. A couple problems popped up immediately.
1. The legal notice string in the registry is limited and lacks any formatting.
2. The dialog box isn’t big enough to display the maximum characters in the string anyway, so it’s cut off at the bottom.
A bit of searching revealed a long history of frustrated people attempting to do the same thing and not a lot of answers on how to pull it off.
Here was one with a vbscript that at first seemed promising but wasn’t what I wanted. It seemed overly complicated. There were little apps that promised to write the legal notice into the registry the way you wanted it. I tried one but it didn’t work out for me.
I finally found one post that seemed to be the simplest answer to solve problem number 1. Apparently you could just add quotes and spaces into the .inf file that stores the string value for the registry entry. By now I’m thinking, wow, that’s pretty simple, why didn’t Microsoft ever update this to allow formatting? I tried it out and it worked great!
On to problem number 2. Focusing on the dialog box as the issue, I eventually discovered Resource Hacker. A freeware utility that would allow me to edit the msgina.dll that controlled the dialog boxes as well as icons, images and text for many of the windows that the OS presented you.
Adding a scroll bar to the legal notice amounted to inserting WS_VSCROLL to the code for the dialog box. Probably cake for anyone familiar with programming, which I was not. Now that I had a scroll bar and formatted text for my legal notice I went a little crazy and replaced all the logon images with company branding and changed many of the text strings for errors and user notification. At the end of the day I was giggling and quite pleased with my little experiment.
All this editing of the msgina.dll, a windows protected file, created problem number 3. How was I going to push out a file to my machines that Windows is trying to protect? I’d been doing it manually on one machine to test with so all I needed to do was replace the protected file in the dllcache and then replace the one in use. Windows would pop up a message about the file and you could just agree to use the file. Not sure how I’m going to pull that off across the network. I’ve left the project for now assuming I’ll complete it in January.
Since I was editing the domain legal notice, all of the machines were at least getting the right text, just the xp clients couldn’t see all of it unless they used the mouse to select the text and it would kind of scroll down. Windows 7 doesn’t use the same dialog box and it already knew to include a scroll bar and obviously wouldn’t take advantage of the images I’d replaced. By now I’m thinking, if we had all Win7 machines I really wouldn’t have needed to do most of this. We probably still have a few years to go before all of our machines are Win7 so the work will be of some use.