By Bryan Keadle
There are times when administration via scripts/batch files via the login script are still the quicker, easier way to manage your workstations. If you don't have ZENworks, then you especially depend on scripts for managing your workstations (right?!). However, despite all your good efforts of automation and communicating to your users about the upcoming updates, impatient or unaware users can still abort your scripts by closing the window running the process.
I realized this just recently, and decided I wanted a way to disable the control menus so that my user's don't kill the process.
So at the beginning of my script, I change the TITLE of the window, then run this DisableClose utility to disable the Close control menu (disable the upper-right-X button):
TITLE Workstation Updates
DisableClose "Workstation Updates"
echo Workstation updates being applied . . .
Additionally, you may want to minimize all windows either after your script starts (so it can run in the background, suggesting that the user can continue to work while it is processing) or before your script starts (so your update script is the focus so that the user is aware of the progress), ShowDesktop.exe is the same thing as clicking on the Quick Launch's "Show Desktop" icon:
DisableClose also enables you to disable the other control menu items, Minimize, Restore, and Maximize if you like.
WindowName - Specify Window Name to have the close system menu disabled.
Case Senstive. Partial name preceed with ~
CLOSE - (default) disable CLOSE window system menu
MINIMIZE - disable MINIMIZE window system menu
RESTORE - disable RESTORE window system menu
MAXIMIZE - disable MAXIMIZE window system menu
ALL - disable ALL window system menus
ENABLE - re-enable the control menus