Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Personalised Logon Message in Active Directory 1

Status
Not open for further replies.

NICKYD

IS-IT--Management
Apr 18, 2002
9
GB
Can anyone help we are trying to set a personalised logon message when users log on. I know we can do it locally on the PCs but we have a lot of machines and being able to do this through a group policy in Active Directory would be very helpful. We are running NT4, Windows2000 and XP in our network. Any ideas would be gratefully appreciated
 
This setting is done at the Computer Configuration side of the group policy object under Windows Settings\Security Settings\Security Options\"Message Text for user attempting to logon" and "Message Title for users attempting to logon"
 
How about a batch file that would use the net send command? Place the batch file in to profiles tab of the users you want to try this on and see what happens. I'll try it on my pc and see what happens. Glen A. Johnson
Johnson Computer Consulting
MCP W2K
glen@nellsgiftbox.com
[americanflag]

"What really happens is trivial in comparison to what could occur."
Robert von Musil (1880-1942); Austrian author.
 
MisterNiceGuy - This is what we have done previously and it failed to work in the global policy - Is there any reason for this not working? is there a setting somewhere that needs activated etc ?, Looking forward to your reply.
 
Hey, funny you should ask...does this help...

// Script Sample for Windows Scripting Host
//
// Define constant values.
//
var MB_ICONINFORMATION = 0x40;
var MB_ICONQUESTION = 0x20;
var MB_ICONYESNO = 0x04
var IDYES = 6;
var IDTIMEOUT = -1;

var POPUP_WAIT = 5; // close popup after 5 seconds.

//
// Create ActiveX Controls
//
var Shell = WScript.CreateObject("WScript.Shell")
var Env = Shell.Environment("PROCESS")

//
// Set greeting message.
//
var strTitle = "Sample Login Script";

var strMsg = "Welcome \"" + Env("UserName")
strMsg += "\" to the \"" + Env("UserDomain") + "\" domain\r\n\r\n"


Shell.Popup(strMsg, POPUP_WAIT, strTitle, MB_ICONINFORMATION);

//
// Launch Internet Explorer if user wants.
//
strMsg = "Do you want to visit the Windows 2000 web site?";
var strURL;

strURL = "
var intAnswer = Shell.Popup(strMsg,
POPUP_WAIT,
strTitle,
MB_ICONQUESTION | MB_ICONYESNO );

if (intAnswer == IDYES) {
Shell.Run(strURL);

}

just save that as xxxx.js and put it in the GP as a logon script for whomever you want to see it. Of course, there is more in there that you need, but just take out what you dont want and change as needed. I got this script from one of my MCSE books.
 
The setting I mentioned would only apply to the Windows 2K and Xp boxes since NT does not apply policies set in GPO's. You will need to use NT style policies for the Nt systems. User Gpresult.exe /v to verify that your policies are applying to your clients.

You could alternately set this with a logon script if the users in your domain have access to the registry. Here is where the policy is set in the registry.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"LegalNoticeCaption"="The Title for my message window"
"LegalNoticeText"="The Message I want my user to see"



 
You know, I often find myself pulling out my hair over Group Policy problems like these. I end up going back to traditional scripting for a lot of tasks.

How about this in the logon script:

if "%username%"=="joeschmoe" then net send %computername% "This is a special message for joeschmoe!"

or, when you get a lot of people, and don't want to have a line for each person in the login script...

if exist "\\server\greetings\%username%.txt" then start.exe /MAX notepad.exe "\\server\greetings\%username%.txt"

When joeschmoe logs on, joeschmoe.txt will be displayed. And when janedoe logs in, janedoe.txt will be displayed if it exists.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top