none
creating random login message RRS feed

  • Question

  • Hi, I am the administrator of windows AD domain in my company. I am planning to show some informational random message (like tips of the day) to the users when he/she logs into the domain with his userid and password. Each time user logs into the domain , a different message will display and user can close it by clicking the OK button . I know the process of configuring static message from group policy, which shows when user logs into the domain. But it cannot show the different message randomly.

    If that have to do through any script, can anyone also provide me that.

    thanks in advance,


    kolit

    kolit
    Thursday, March 19, 2009 3:38 PM

Answers

  • Hi,

    You can use a login script that pops-up a MsgBox containing text from a randomized array of text. You can add the following routine to your login script:

    1 ' Copyright (c) 2009 Salvador Manaois III  
    2 ' http://badzmanaois.blogspot.com  
    3 ' =========================================================================  
    4 ' You are free to use and modify the script at will  
    5 ' provided you understand that all code here is made available AS IS, with  
    6 ' NO WARRANTY WHATSOEVER. The author take NO RESPONSIBILITY AT ALL for  
    7 ' problems that result from the use of this script or any part thereof.  
    8 ' If you modify or quote the script, you must retain this header  
    9 ' and copyright notice.  
    10  
    11 arrMsg = array("This is a monitored machine. Please use with caution.", _  
    12                 "WARNING! Use this machine with care.", _  
    13                 "Welcome to Northwindtraders. Have a nice day", _  
    14                 "Howdy! How's your day?")  
    15  
    16 numHigh = 3  
    17 numLow = 0  
    18  
    19 Randomize  
    20 numRnd = Int((numHigh - numLow + 1) * Rnd + numLow)  
    21  
    22 Msgbox arrMsg(numRnd), 0, "Sample Message Pop-up" 
    23  

    For scripting topics, please post your queries at the "The Official Scripting Guys Forum!"

    http://social.technet.microsoft.com/Forums/en-US/ITCG/threads/

    Regards,

    Salvador Manaois III
    MCITP | Enterprise & Server Admin
    MCSE MCSA MCTS CIWA C|EH
    Bytes & Badz: http://badzmanaois.blogspot.com
    Friday, March 20, 2009 3:45 AM
  • Hi,

     

    Thanks for the update.

     

    I understand that you want to make the messages in bold and bigger font.

     

    Please understand that the standard system message box does not support this as standard behavior. 

     

    For scripting topics, please post it at the "The Official Scripting Guys Forum!"

    http://social.technet.microsoft.com/Forums/en-US/ITCG/threads/

    Monday, March 30, 2009 7:09 AM
    Moderator

All replies

  • Hi,

    You can use a login script that pops-up a MsgBox containing text from a randomized array of text. You can add the following routine to your login script:

    1 ' Copyright (c) 2009 Salvador Manaois III  
    2 ' http://badzmanaois.blogspot.com  
    3 ' =========================================================================  
    4 ' You are free to use and modify the script at will  
    5 ' provided you understand that all code here is made available AS IS, with  
    6 ' NO WARRANTY WHATSOEVER. The author take NO RESPONSIBILITY AT ALL for  
    7 ' problems that result from the use of this script or any part thereof.  
    8 ' If you modify or quote the script, you must retain this header  
    9 ' and copyright notice.  
    10  
    11 arrMsg = array("This is a monitored machine. Please use with caution.", _  
    12                 "WARNING! Use this machine with care.", _  
    13                 "Welcome to Northwindtraders. Have a nice day", _  
    14                 "Howdy! How's your day?")  
    15  
    16 numHigh = 3  
    17 numLow = 0  
    18  
    19 Randomize  
    20 numRnd = Int((numHigh - numLow + 1) * Rnd + numLow)  
    21  
    22 Msgbox arrMsg(numRnd), 0, "Sample Message Pop-up" 
    23  

    For scripting topics, please post your queries at the "The Official Scripting Guys Forum!"

    http://social.technet.microsoft.com/Forums/en-US/ITCG/threads/

    Regards,

    Salvador Manaois III
    MCITP | Enterprise & Server Admin
    MCSE MCSA MCTS CIWA C|EH
    Bytes & Badz: http://badzmanaois.blogspot.com
    Friday, March 20, 2009 3:45 AM
  • hi,

    Thanks for your script. This serve my purpose.

    By the way is it possible to make the messages in the messagebox in bold and bigger font, also is it possible to make the message box more attractive rather then the default one. I am not a scripting guy, and no idea in it. This will be great if this can be done.

    thanks again

    kolit

    kolit
    Thursday, March 26, 2009 3:59 PM
  • Hi,

     

    Thanks for the update.

     

    I understand that you want to make the messages in bold and bigger font.

     

    Please understand that the standard system message box does not support this as standard behavior. 

     

    For scripting topics, please post it at the "The Official Scripting Guys Forum!"

    http://social.technet.microsoft.com/Forums/en-US/ITCG/threads/

    Monday, March 30, 2009 7:09 AM
    Moderator