Can you edit the Windows 2003 Login Box ?

Associate
Joined
30 May 2005
Posts
1,533
Location
Greater Manchester
I need a way to edit the login box of a Win 2k3 box, to add the name of the server to it.

I don't know if this is possible, but we have just miserably failed a disaster recovery audit because we had no way of knowing which server is which.

We have 3 racks with about 8 servers in each. The sticky labels on the front were all out of date, and the only way of knowing which server is which is by going to each server with the KVM and dropping down the domain box to read the name.

I need this to be obvious just by flicking through the KVM switch. I thought if I could edit the Windows graphic above the login box, it would make life easier.

Can anyone help - how do you label your servers ?
 
[Start] [Run] [Regedit]
Registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\ CurrentVersion\Winlogon
Modify/Create the Value Name [LogonPrompt] according to the Value Data listed below.
Data Type: REG_SZ [String Value] // Value Name: LogonPrompt
Value Data: [Enter the text of the message]
Exit Registry and Reboot
 
oddjob62 said:

Thanks for the idea.
Although our Adder KVM has the server name onscreen, reading this thread got me thinking that I could do with something more obvious.

I think I'll use your reg key to add a server description, but I think I'll also change the logon .bmp too. (reg key below)

Mainly as it's visible >before< the logon screen is displayed, meaning I can identify servers on the fly, without pressing cntl-alt-del first.
I think I'll also make it in different colours to pick out the critical servers.


-------------------------------------
To change the logon background

Click Start > click Run > type regedit > and click OK.
Navigate to the following registry key: HKEY_USERS\DEFAULT\Control Panel\Desktop
In the details pane (right-side), double-click the Wallpaper string value item.
In Value data, type the path and name of the picture or background, and then click OK
-------------------------------------

note: this is not the same as the desktop background...



(darn, I've found myself another job to do...)

.
 
Last edited:
Thanks oddjob62 - brilliant idea. I did not know that key existed.

bitslice said:
Thanks for the idea.
Although our Adder KVM has the server name onscreen, reading this thread got me thinking that I could do with something more obvious.

Ours do too - but where I find the problem, is if that data is not kept up to date (usually when you are trying to replace a dead server in a hurry) the information quickly becomes out of date.

What I like about oddjob62s idea, is that I can now write a VB script to pull the PC name from the registry and write it to the new key - so there is no human error involved. It can be automatic.

Going to look into the logon background screen idea too, thanks.
 
Pinkeyes said:
I can now write a VB script to pull the PC name from the registry....
That's a neat idea :-)

I was wondering if I could get an update in the event log to also trigger something to write that same event text into the logon .bmp
Than I'd have the latest errors listed for reference before I log in.

hmmmm.

(or maybe just schedule BGinfo.exe to recreate a logon .bmp every hour)


.
 
Last edited:
you could hack msgina.dll with resacker so the actual logon box is changed

windows update could replcae the file possibly though
 
This batch file does the hostname lookup and writes that into the relevant logon reg key. (some lines may wrap)


-----------------------------------
rem | a batch file to look up the local machine name (hostname),
rem | echo the name to the screen,
rem | and then write it into another location in the registry
rem | where it will be displayed in the logon box
rem |
rem | OcUK post, bitslice, Dec 2006, "add host to logon box.bat"
rem | (works on Win2K, not tested on anything else)
rem | requires "REG.EXE" from resource kit

@Echo OFF
CLS
CD C:\#batch\
IF EXIST DEL keyname.txt
SET hostname=undefined
SET temp_keyname_file=C:\#batch\keyname.txt


REG QUERY "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\ComputerName\ComputerName" /v ComputerName > %temp_keyname_file%
FOR /F "tokens=1,2,3*" %%a in (keyname.txt) do set hostname=%%c

ECHO Local Machine Name = "%hostname%"

REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LogonPrompt /t REG_SZ /d %hostname% /f
-----------------------------------



hth :-)
.
 
Last edited:
This VB Script I wrote today does it too.... ;)

'::::::::::::::::::::::::::
'::: LogonPrompt.VBS ::
'::::::::::::::::::::::::::

Option Explicit
On Error Resume Next

Dim objShell, objNetwork
Dim strComputerName, strLogonPrompt, StrLogon

' Create the Shell object
Set objShell = CreateObject("WScript.Shell")
Set objNetwork = CreateObject ("WScript.Network")

' Set the string values
strComputerName = objNetwork.ComputerName
strLogon = "LogonPrompt"
strLogonPrompt = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\"

' Create new key, and write PC name to it.
objShell.RegWrite strLogonPrompt & strLogon, strComputerName, "REG_SZ"

Pretty much my first VB Script, so go easy if it breaks all the rules...

I also used BGinfo too, which is rather a cool app.
 
^^
yep, that's neater, DOS seems to lack an easy way to do some things,
but then I don't know VB, so I struggle on :)

I was trying to get it to check if the reg key existed, but nothing seems to support that type of action. (this can't be right...?)
I had a bit of code to export the key, look for the existence of the host name and fail if was already there, but then I thought - why bother... :D
.
 
Last edited:
Back
Top Bottom