When writing trigger and other types of ClearCase scripts to run on multiple types of Windows computers (Windows 98, Windows Me, Windows NT, and Windows 2000 systems), you need to take into consideration the differences between the command shells for the different platforms. Windows NT, Windows 2000, and Windows Me use the cmd.exe command shell; Windows 98 uses the command.com shell.
There are three main differences between the two command shells:
The cmd.exe shell supports many more features than the command.com shell, so any scripts that take advantage of those features do not run on Windows 98 computers. Therefore, we recommend that you restrict the functionality in your trigger scripts to the features common to both shells.
When GUI applications are invoked from a batch script, the cmd.exe shell waits for the application to exit, while the command.com shell proceeds with script execution. This behavior affects execution of interactive triggers, for example, the use of clearprompt within a script. This difference can be resolved by invoking GUI applications using the syntax start/wait (for example `start/wait clearprompt').
Because there is no way to pass a nonzero status from a batch script back to ClearCase on Windows 98 computers, a preoperation trigger that invokes a batch script never fails on Windows 98 systems.
To resolve this problem, the program that the trigger executes must be something other than command.com. For example, it could be ccperl.exe, or the trigger script itself could be reimplemented as an executable program. (Note that the common technique of embedding a Perl script in a batch file does not resolve the problem because command.com is still the outermost interpreter.)
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |