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
Solved

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

Posted on 2009-05-12
3
596 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

809 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