Novell is now a part of Micro Focus


Novell Cool Solutions: Cool Tool

Digg This - Slashdot This

In Brief

Run a program only if the program has updated.


Product Categories:
  • ZENworks
  • Functional Categories:
  • Batch File
  • Upgrade
  • Versions
  • Posted:6 Apr 2005
    File Size:394KB
    Publisher:Bryan Keadle


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


    Sometimes, I want to run a program only if the program (or it's data file) has changed since the last time it was run. RunIfNewer allows me to run a program based on whether it, or some specified file, has changed.

    For example, we download the latest virus definitions (an .EXE posted) to the network, and our workstation administration batch file as part of our login script will execute this definitions update whenever it is newer than the last time it was run on the workstation:

    RUNIFNEWER WS QUIET / F:\PUBLIC\NavDef.exe /s /q

    Another example, we can easily distribute a group of files/directories to workstations upon login whenever we update the source ZIP file:

    RUNIFNEWER WS QUIET FILE=F:\PUBLIC\WSFILES.ZIP / pkzip32-extract=update -overwrite=all F:\PUBLIC\WSFILES.ZIP C:\

    Checks if (Program Name) has newer date/time stamp, unless FILE= is specified, in which case, it checks the date/time stamp of the specified file, and runs (Program name) if IT is newer. This accomodates a data file changing date/time instead of the executable.

    "/" is required to delimit between RUNIFNEWER options and the Program and parameters entry

    If (Program Name) has a newer file date/time than the last time it was run, run it, otherwise skip it.
    This program is intended for administration-type programs, like batch files, that need to be distributed/run only when changes are made/added.

    Option Defaults are:
    HKLM registry flag (WS)
    WAIT for program to finish before continuing
    Run in Normal Window
    with BoxText info (not QUIET)

    Hold down SHIFT key to view/manage the Registry flag entries.

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

    © Copyright Micro Focus or one of its affiliates