Novell is now a part of Micro Focus

DisableClose and ShowDesktop

Novell Cool Solutions: Cool Tool

Digg This - Slashdot This

In Brief

Prevent users from closing the windows that are running scripts.


Product Categories:
  • Open Enterprise Server
  • ZENworks
  • Posted:15 Jun 2006
    File Size:488KB
    Publisher:Bryan Keadle


    Please read the note from our friends in legal before using this file.


    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):

    @echo off
    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.

    SYNTAX: Disableclose (WindowName) (CLOSE | MINIMIZE | RESTORE | MAXIMIZE | ENABLE)
     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

    Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

    © Copyright Micro Focus or one of its affiliates