none
Script for generating warning message during Shutdown by GPO RRS feed

  • Question

  • Hello,

    I want to apply GPO in my AD to generate a warning message in the pop-up window just after when user click SHUT-DOWN  in their system .

    But I don't know what are the script for the same in batch file. Any body please suggest me.

    Thanks 

    Thursday, March 19, 2015 7:21 AM

Answers

All replies

  • You cannot display a message during shutdown.  It will hang the system.  Display a logoff message if you like.

    Post your question in GP forum.


    ¯\_(ツ)_/¯

    Thursday, March 19, 2015 9:36 AM
  • I think it is possible because there is a option to apply the GPO policy at the time of shutdown under computer configuration . Apart from that I post this question in GP forum also but there is script related issue as I use following script in batch file it work also but with a cmd promt in his background and I need a message without these background .

    echo msgbox "Hey! Here is a message!" > %tmp%\tmp.vbs
    cscript /nologo %tmp%\tmp.vbs
    del %tmp%\tmp.vbs

    any body please suggest what else I have to do .

    Thanks 
    Thursday, March 19, 2015 11:46 AM
  • You can't stop someone from shutting down the computer if they have physical access to it, but if the point is to stop users from shutting down, then set the security option ('Shut down the system' user right).


    -- Bill Stewart [Bill_Stewart]

    Thursday, March 19, 2015 12:49 PM
    Moderator
  • Thanks for the information.

    But i want to apply this in the client machine which is a virtual machine .And i want to apply it by GPO from the Domain Controller. 


    Saturday, March 21, 2015 3:30 AM
  • Ask in the GPO forum how to set policies to deny system shutdown.

    -- Bill Stewart [Bill_Stewart]

    Saturday, March 21, 2015 2:48 PM
    Moderator
  • Hello,

    i know the process how to apply it , the only things i have a problem is the content of script  as i mentioned above and now below also. I shown the script above which i used so far here only i need how to improve my script .

    echo msgbox "Hey! Here is a message!" > %tmp%\tmp.vbs cscript /nologo %tmp%\tmp.vbs del %tmp%\tmp.vbs

    Thanks

     
    Monday, March 23, 2015 4:44 AM
  • I don't think you're going to be able to do this in a way that works like you want it to.

    -- Bill Stewart [Bill_Stewart]

    Monday, March 23, 2015 2:30 PM
    Moderator