All Forums >> [Scripting] >> Post a VBScript >> Prevent logoff Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
This script is designed to prevent a logoff from happening if a specific program is running, otherwise, if the program isn't found, let the logoff process continue. I don't know everyone's script knowledge level so just in case I need to clarify I use the words process/program/executible interchangeably throughout the following explanation:
When the script is double-clicked it searches through the process list for a specific executible file. If this process is running on the computer the script will display a message to the user stating "x processes found. Please close before continuing to logoff". If the process is not found the script will logoff the user. In order for this to work you need to put a shortcut to this script in the Start menu (and/or desktop) and edit local group policy so that the logoff button no longer appears in the Start or Ctrl+Alt+Del menu. This will force users to click on the script whenever they want to logoff. You also need to change where it states insert program name name to whatever program you want the script to search for. You can also use this script to prevent shutdown and restart. I made a comment towards the end of the script as to how.
< Message edited by kbern3 -- 7/10/2007 4:39:18 AM >