Hi this has been discussed before but I cannot find what I am looking for :(
I am after a script that will display a message when a user logs in, please can someone point me in the right direction please?
Thanks
Printable View
Hi this has been discussed before but I cannot find what I am looking for :(
I am after a script that will display a message when a user logs in, please can someone point me in the right direction please?
Thanks
Do a forum search for "message of the day"
I just use the VBscript msgbox function;
The 4096 makes the message box a system model, which means the user can't do anything unless they click OK. The other available options are explained in this article;Code:msgbox "This is my message",4096,"Title of message box"
http://www.w3schools.com/vbscript/func_msgbox.asp
I've several scripts that display messages to users, e.g. if they are banned from the internet in my school, they get a message telling them at logon.
It's possible to make this much more elaborate and have a yes/no response for the user to agree to an AUP before they can do anything and if they don't agree for them to be logged off, but for a basic message box, the above will do it.
Mike.
AutoIT:
Will show:Code:MsgBox(64,"Message Of The Day","Test For Message Of The Day")
http://img57.imageshack.us/img57/707/messagely6.jpg
@ Mattx what format do you save it as please?
@ITWombat i did do.
@maniac thanks for the link
Thank You
Z
AutoIt Scripts need to be compiled with AutoIt, or run through an interpreter.
For an easier time, put maniac's code into notepad, and save it as a text file with .vbs as the extension - then it'll just work!
Hi
Thats what i ahve done, works good :)
Thanks
Hi
How would I make it so the message will disappear in 5 seconds & can i use some code to display the users name? For example %firstname% or %username%
Thanks Allot
Under AutoIT use the @UserName macro
Thanks
How would i put a timeout on it please? Also is it possible to display the users first name only?
Z
AFAIK in VB, you'll need to use an ADSI query to grab that stuff...(so I didn't bother)
I don't use the msgbox function for popups when I did my logon script...
I used the Windows Shell Popup...
oWSH = CreateObject("WScript.Shell")
oWSH.Popup "my message", 5, "title"
5 = 5 seconds...
looks like a normal msgbox... not sure what other properties it can have though, never really looked into it..
Code:Dim oWSH
Set oWSH = CreateObject("WScript.Shell")
oWSH.Popup "my message", 5, "title"
Lovely, Thanks alot.
I might be pushing it here, how can i get the username, e-mail address etc in please?
Thanks