FN-GM Posted December 23, 2007 Report Posted December 23, 2007 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
ITWombat Posted December 23, 2007 Report Posted December 23, 2007 Do a forum search for "message of the day"
maniac Posted December 23, 2007 Report Posted December 23, 2007 I just use the VBscript msgbox function; msgbox "This is my message",4096,"Title of message box" 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; 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.
mattx Posted December 23, 2007 Report Posted December 23, 2007 AutoIT: MsgBox(64,"Message Of The Day","Test For Message Of The Day") Will show: http://img57.imageshack.us/img57/707/messagely6.jpg 1
FN-GM Posted December 23, 2007 Author Report Posted December 23, 2007 @ Mattx what format do you save it as please? @ITWombat i did do. @maniac thanks for the link Thank You Z
crc-ict Posted December 23, 2007 Report Posted December 23, 2007 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!
FN-GM Posted December 23, 2007 Author Report Posted December 23, 2007 Hi Thats what i ahve done, works good Thanks
FN-GM Posted February 15, 2008 Author Report Posted February 15, 2008 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
mattx Posted February 15, 2008 Report Posted February 15, 2008 Under AutoIT use the @UserName macro 1
FN-GM Posted February 15, 2008 Author Report Posted February 15, 2008 Thanks How would i put a timeout on it please? Also is it possible to display the users first name only? Z
Lithium Posted February 15, 2008 Report Posted February 15, 2008 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..
FN-GM Posted February 15, 2008 Author Report Posted February 15, 2008 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.. Is that all the code it doesn't appear to work. Thanks
DarkLight Posted February 15, 2008 Report Posted February 15, 2008 Dim oWSH Set oWSH = CreateObject("WScript.Shell") oWSH.Popup "my message", 5, "title"
FN-GM Posted February 15, 2008 Author Report Posted February 15, 2008 (edited) Lovely, Thanks alot. I might be pushing it here, how can i get the username, e-mail address etc in please? Thanks Edited February 15, 2008 by FN-Greatermanchester
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now