Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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!

  • 1 month later...
Posted

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

Posted

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..

Posted
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

Posted (edited)

Lovely, Thanks alot.

 

I might be pushing it here, how can i get the username, e-mail address etc in please?

 

Thanks

Edited by FN-Greatermanchester

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



  • 47 When would you like EduGeek EDIT 2025 to be held?

    1. 1. Select a time period you can attend


      • I can make it in June\July
      • I can make it in August\Sept
      • Other time period. Comment below
      • Either time

×
×
  • Create New...