Solved

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

Posted on 2009-05-12
3
610 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

705 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