Solved

How to show a Legal Notice when users log onto the network

Posted on 2009-05-12
3
587 Views
Last Modified: 2012-05-06
I am able to add a legal notice to users desktops by modifying the following registry keys:
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\legalnoticecaption
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\legalnoticetext

The problem I have is rather than manually applying this to each desktop, I want to find a way to automatically set this via a login script, group policy, etc so I can get the legal notice applied to 100+ systems on the network. I am running a Windows 2003 server domain.  

I've researched how to do this on E.E. and have tried the following:
1) Apply the following commands to the login script:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon /v LegalNoticeText /d "I put the heading text to be displayed here" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon /v LegalNoticeCaption /d "I put the message to be displayed here" /f

When I try this from the command line I get the following error:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Program Files\Windows Resource Kits\Tools>reg add "HKEY_LOCAL_MACHINE\SOFTWAR
E\Microsoft\Windows NT\CurrentVersion\Winlogon /v LegalNoticeText /d "I put the
heading text to be displayed here" /f

Error:  Too many command-line parameters

C:\Program Files\Windows Resource Kits\Tools>


2) I created a logonmessage.vbs file as follows:

Option Explicit
 
' Constants
Const HKEY_LOCAL_MACHINE = &H80000002
 
' Variable Declarations
Dim strComputer
Dim objReg
Dim strKeyPath
Dim strValueName
Dim strValue
 
' Variable Initialisations
strComputer = "."
Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
 
' Construct the LegalNoticeCaption and set the value
strValueName = "LegalNoticeCaption"
strValue = "I put the heading text to be displayed here"
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue
 
' Construct the LegalNoticeText and set the value
strValueName = "LegalNoticeText"
strValue = "I put the message to be displayed here"
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue
 
' Tidy up and quit
Set objReg = Nothing
WScript.Quit


I am still new to using VB scripts - so I'm not sure if I am running the above code correctly.  When I run the above vb script I do not see any errors, but when I go into the registry I do not see the LegalNoticeCaption and LegalNoticeText keys updated.  

Any help you can provide would be greatly appreciated.  Thank you in advance.
0
Comment
Question by:drapeaur
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
mpeaden2 earned 500 total points
ID: 24367532
0
 

Author Comment

by:drapeaur
ID: 24367586
I got my vbscript to finally work.  Question though...where is the a proper place to store vbscripts on a Windows 2003 server or is it a matter of preference?
0
 
LVL 3

Expert Comment

by:mpeaden2
ID: 24367630
preference.. there is no particular "correct" place.. please remember to mark my code as answer if it helped you... thanks,
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
nmap scanner? 7 82
Constant Random Blue Screens - Motherboard? 30 89
how to use wail2ban ?? 13 36
UAC Controls - confused 9 32
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now