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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customizing the XP logon box

Status
Not open for further replies.

kachbo1

IS-IT--Management
Nov 16, 2004
40
0
0
GB
Hi,

I would like to add a countdown date timer on the windows logon box to countdown by date.

Our company is being moving and I would like to add something like "XXX days to move"

Is this possible and if so I would appreciate if somone could help me out. If it is not possible at the logon box then something on the desktop would help as well.

We have over 4000 pc's and it would be exceleent if I gould apply this through a GPO etc.

Kachbo.
 
Hi Guys,

A Pop up box will do at login.

Kachbo
 
take a look at

+ WshShell.Popup (this means you can set a time for the message box)


moveDate = CDate("26/11/2003")
Msgbox DiffADate(moveDate)

Function DiffADate(theDate)
DiffADate = "Days from today: " & DateDiff("d", Now, theDate)
End Function

 
I like the screen saver idea myself. A while back I wrote the following script to put text into the marque screen saver. You could have this run at login and produce the value via datediff.

Code:
[green]
'==========================================================================
'
' NAME: SetMarqueeScrSettings.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: [URL unfurl="true"]http://www.thespidersparlor.com[/URL]
' DATE  : 8/11/2004
'
' COMMENT: <comment>
'
'==========================================================================[/green]
Dim path

Set WSHShell = Wscript.CreateObject("WScript.Shell")

path = "HKCU\Control Panel\Screen Saver.Marquee\"

[green]'replace the following with the code to figure out the datediff[/green]
DaysToMove = "45"

WSHShell.RegWrite path & "BackgroundColor","0 18 128","REG_SZ"
WSHShell.RegWrite path & "CharSet","0","REG_SZ"
WSHShell.RegWrite path & "Font","Tahoma","REG_SZ"
WSHShell.RegWrite path & "Mode","1","REG_SZ"
WSHShell.RegWrite path & "Size","24","REG_SZ"
WSHShell.RegWrite path & "Speed","14","REG_SZ"

[green]' the next line contains the marquee text to display.[/green]
WSHShell.RegWrite path & "Text", DaysToMove & " Days Until The Big Move","REG_SZ"
WSHShell.RegWrite path & "TextColor","255 0 255","REG_SZ"
WSHShell.RegWrite path & "Attributes","00000","REG_SZ"

I hope you find this post helpful.

Regards,

Mark
 
Hi Mr Movie,

The script works fine when run manually, however when run via a gpo it does not bring up the popup box.

Please help.
 
Hi MArk,

Thanks for that, however thw company only wants a little popup box at logon.

Kachbo
 
not really aware of how GPO's work with vbscript, sorry. sounds like they inhibit windows from appearing??? very clever or sneaky if they do!!!

if GPO's do not allow GUI then you cant use GPO, QED

how about traditional logonscript?
 
Hi there is a way of having a pop up box appear, before users logon. It appears just after they press CTRL-Alt-Del and before the login box appears.

It's usually used to show security messages, but could be turned to your purpose.

It's set in the registry, the key is:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system
and there are two values:

legalnoticecaption
legalnoticetext

A small startup script (set in a group policy) could update the text daily.

Hope this helps.
 
Using a startup script would require the PC to be restarted each night which is unlikely to happen. Using the legal notice is a good idea. I would however suggest using a script that is scheduled to run at night that connects to each PC to update the value. You will find some sample code to accomplish this goal in my FAQ faq329-4871.



I hope you find this post helpful.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top