Script that changes Legal Notice Text, doesn't apply on all computers?

Punkrulz

Somewhat eXPerienced
Joined
24 Dec 2001
Messages
790
Blah,

I am filled with vague subjects lately! I have been tasked with going around to every single computer and getting some information. While doing so, I have been attempting to troubleshoot why a certain script is not applying all of the settings. We have a script that applies at computer logon, that changes LegalNoticeText, Logon Prompt, as well as the welcome message. The script is as follows:

Code:
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 = "WARNING!!!"
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue
' Construct the LegalNoticeText and set the value
strValueName = "LegalNoticeText"
strValue = "This system is the property of the **************** and established for the sole use of authorized users for official business only. You have no expectation of privacy in its use. To protect the system from unauthorized use and to ensure that the system is functioning properly, individuals using this computer system are subject to having all of their activities on this system monitored and recorded. Anyone using this system expressly consents to such monitoring."
strValue = strValue & vbCrLf & vbCrLf
strValue = strValue & "By continuing to use this system you indicate your awareness of and consent to these terms and conditions of use. LOG OFF IMMEDIATELY if you do not agree to the conditions stated in this warning."
objReg.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue
' Construct the LogonPrompt and set the value
strValueName = "LogonPrompt"
strValue = "Any unauthorized access of this system or unauthorized use of the information                on this system by authorized users or others is prohibited."
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
' Construct the Welcome and set the value
strValueName = "Welcome"
strValue = "                                                     DTPD - 1*"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
' Tidy up and quit
Set objReg = Nothing
WScript.Quit

Now there are a few computers where the legalnotice hasn't changed, but the other things the script applies has. It's being pushed out by GPO. While on these machines, I even tried running the script manually:

cscript \\server\netlogon\legalnotice.vbs

It doesn't seem to generate any errors, but it still doesn't apply the changes! There also isn't anything in the error log as to why. I think these issues are combined with a few other GPO issues we have on machines, but there are no errors to back up any problems.

Is there anything I can add, or do, to see why the script isn't making the registry change?

Btw, for those who suggest that we just use the GPO to push out the change, the administrator who wants this wants perfect formatting, which is unachievable via GPO... that was another thread a long time ago, we tried, we failed, moving on. :)
 

Punkrulz

Somewhat eXPerienced
Joined
24 Dec 2001
Messages
790
Just to update you guys on this, this is even more strange! I have recruited the help of cpugenius, who had provided me with a registry file that would make the necessary changes. What's strange, is that when I ran the file, it still didn't work.

Further checking into the registry, it appears that the changes are in fact listed in the registry, but for some reason the logon text is showing something else! Why would that be?
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,011
Messages
673,478
Members
5,608
Latest member
endryshall