Windows Legal Notice
Windows legal notice is a useful field that allows you to pop up information or instructions to a user logging into a system. The downside is that it is a string value in the registry, which means you can’t directly enter blank/new lines for formatting.
With Windows 2000, it was easy to do. You could open up regedt32 and modify the key as a binary value. Windows XP no longer has regedt32 and the functionality seems to have been taken out of regedit.
Here’s a solution that seems to work:
Start a new vbs file, legalNotice.vbs
Copy and paste the below code into it. Modify the title and text to suite your needs (you can add as many text lines as you want). Using 2 x VbCrlf will give you double spacing.
Dim WshShell, bKey
Set WshShell = WScript.CreateObject("WScript.Shell")
Title = "Windows Title"
Text = "This is my text. " & VbCrLf & VbCrLf & "line 2"
Test = Text & VbCrLf & VbCrLf & "line 3"
WshShell.RegWrite "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionpoliciessystemLegalNoticeCaption", Title, "REG_SZ"
WshShell.RegWrite "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionpoliciessystemLegalNoticeText", Text, "REG_SZ"
To smack it onto multiple computers at boot throw this into your startup scripts for the computer (this assumes its on a remote computer. if its the localhost use a local path):
cmd /c cscript \\computername\path\to\file\legalnotice.vbs
RSS Feed