Zombie WinOS2 Program object Documentation

From OS2World.Com Wiki
Revision as of 18:55, 7 August 2013 by Martini (talk | contribs)
Jump to navigation Jump to search

Description

The Zombie WinOS2 Program object fixes a long standing bug in eComStation, and OS/2, where some WinOS2 programs do not terminate completely when run in the Seamless mode. The bug manifests after a WinOS2 program is closed by the hatching of the WinOS2 program object not going away, and the program showing that it is still running in system monitor programs.

The Zombie WinOS2 Program object only runs WinOS2 programs, and it only runs those programs in 386 Enhanced, Seamless mode. Non WinOS2 programs, or WinOS2 programs which are run in a mode other than Seamless 386 Enhanced, should use a regular Program Object.

In addition to starting and completely terminating WinOS2 program, Zombie WinOS2 object provides the following optional enhancements:

  1. The ability to use data files with long names in WinOS2 applications.
  1. Saving extended attributes of data files used with WinOS2 application, with certain limitations.
  1. Clearing of read only attribute for data files, i.e. a bug fix for Improv.

Installing

The Zombie WinOS2 Program object comes as a WarpIn archive (Zombie.wpi).

Install using WarpIn

1.Double-click on Zombie.wpi, or drop Zombie.wpi on the WarpIn icon. [[image:]]

2.Add Startapp to the xCenter or eCenter Window List Filter, as described below.


Once you finish the installation you will have a template object titled Zombie WinOS2 Program in the Templates folder. Drag from the template and drop on the desktop or another folder to create an object for each WinOS2 application you want to run in seamless mode.


Add StartApp to xCenter/eCenter Window List Filter

1.Right click on the window list area of xCenter/eCenter, as shown below.


[[image:]]

2.Type Startapp in the New entry field; click the Add button.


[[image:]]

File List

The following files are included in the distribution

File NameDescription

WINZOMBE.DLLInstalled to C:\OS2\DLL. Contains the WINZOMBE WPS class.

WINZOMBE.EXEInstalled to C:\OS2\APPS. Starts WinOS2 session and StartApp.Win program.

STARTAPP.WINInstalled to C:\OS2\APPS. Starts WinOS2 application, monitors completion of application, sends notification to Winzombe.exe of termination of application.

WINZOMBE.ICOInstalled to C:\OS2\APPS. Icon for use with WINZOMBE WPS class.

Enhancements

In addition to fixing the bug in eComStation preventing some WinOS2 program from terminating completely (see Overview), the Zombie WinOS2 Program object provides the following enhancements.

Long file names

This allows WinOS2 programs to access files with names, or along paths, which do not conform to the FAT 8.3 name format.

Save / restore extended attributes

This option saves extended attributes of a data file across executions of the WinOS2 program.

Clear read only attribute

This option clears the read only attribute of the data file, to compensate for a bug in Improv.

Long file names

WinOS2 (Windows 3.1) applications can only see files the names that fit the FAT 8.3 naming format, and which reside on a path that also conforms to the FAT 8.3 format.

When using the Workplace Shell the Zombie WinOS2 object can overcome the FAT 8.3 naming restriction using one of two methods: 1) Rename/move or 2) Copy. Either method works regardless of whether the file is dropped on the Zombie WinOS2 Program object, or associated to the Zombie WinOS2 Program object.

Do nothing

Any file dropped on a Zombie WinOS2 Program object, or associated with the object, is passed to the WinOS2 program as is.

Rename/move file

If a data file name does not conformat to FAT 8.3 format, Rename/move will rename the file to a FAT 8.3 format name before passing the file to the WinOS2 program. Upon termination of the WinOS2 program the file is renamed back to its previous name.

If the file resides on a path with a directory that does not conform to the FAT 8.3 format, the file is moved to the root directory of the same drive, or to the directory specified in ZOMBIE_DIR, before the WinOS2 program is started. The file is moved back to its original location at termination of the WinOS2 application.

Rename is faster that copy.

Copy file

If a data file name does not conformat to FAT 8.3 format, the data file is copied to the same directory with a FAT 8.3 compatiable name. Upon termination of the WinOS2 application the file is copied back over the original file, keeping the original file's name.

If any of the directories along the path do not conform to FAT 8.3 naming, the file is copied to the root directory, or the directory specified in ZOMBIE_DIR, before the WinOS2 application is started. When the WinOS2 application terminates the file is copied back to its original location, overwriting the original file.

Note that renaming and/or moving a file is faster than copying a file.

Rename/move or copy file

When this button is selected, files are renamed and/or moved when possible, and copied when a rename or move is not possible. A rename and/or move is not possible in the following two situations:

  • When the file is in UNC format, i.e. the file resides on a remote machine and you access it with the File and Print Client Resource Browser - which is located in the Local Network folder.

[[Image:]]

  • Any directory along the path of the data file is not in FAT 8.3 format, and the path specified in ZOMBIE_DIR is on a different drive than the path containing the data file.

Do not copy back - read only

If the data file is copied, and you know that you will not be making changes to the data file, selecting this option saves the work of copying the file back to its original location and/or name.

You might want to use this option, for example, when you are running WordView.exe, which does not allow any changes to the MS Word document being viewed.

FrameMaker backup file

If the Automatic Backup on Save, or Automatic Save options are selected in Preferences, FrameMaker will create a backup file, and possibly an autosave file.

Selecting this option will insure those file(s) are moved or copied back to the original location of the data file when FrameMaker terminates. It will also insure the backup/autosave file(s) are renamed back to their original names, if the data file had to be renamed to a FAT 8.3 name.

Save / Restore Extended Attributes

Most WinOS2 applications destroy the extended attributes of any data files they open.

The Save/restore extended attributes option preserves extended attributes across the execution of a WinOS2 application; extended attributes of any data file passed to the WinOS2 application are saved before the application is started, and restored after the WinOS2 application terminates.

You should keep the following points in mind when using Save/restore extended attributes:

  • Extended attributes are only saved for files passed to the WinOS2 application by the Workplace Shell, (i.e. when you drop a file on the Zombie WinOS2 Program object or when you double click on a data file associated with a Zombie WinOS2 Program Object.) Files that are opened within the WinOS2 application, for example with the application's File - Open menu, do not have their extended attributes saved.
  • Most WinOS2 application do not lock extended attributes while they have a file open. If you change any extended attributes of a data file while it is open in a WinOS2 application, those changes will be overwritten with the saved attributes when the WinOS2 application terminates.

Tip: One way of preventing yourself from accidentally opening a file within a WinOS2 application and potentially losing the extended attributes is to only use long file names on data files. You can use the Long File Names feature of the Zombie WinOS2 Program object to use the file with the WinOS2 application, but the file will be invisible in the File - Open dialog of the WinOS2 application.

Clear Read-Only Attribute

When the Clear read only attribute option is selected the Zombie WinOS2 Program object will clear the read-only attribute for the data file after the WinOS2 application has terminated.

Some WinOS2 applications set the read-only attribute of a data file when they open that file, and clear the attribute when they close the data file. This is done to multiple users, or more than one application, from making changes to the file at the same time.

The Clear read only attribute option is for use with WinOS2 applications which do not clear the read-only attribute when closing the data file while running in WinOS2; Lotus Improv is one such application.

Note: Files have attributes, and extended attributes. Attributes are recognized and utilized by OS/2, WinOS2 and DOS applications. Extended attributes are only recognized and utilized by OS/2 applications.

There are always four attributes for each file, and they are: Archive, Read-only, Hidden, and System. Each attribute has only two possible values: clear or set.

Extended attributes are optional for a file, meaning there may be no extended attributes, or multiple extended attributes for a single file. See Extended Attributes for more information.

ZOMBIE_DIR=

This environment variable determines where files are copied or moved for the duration of execution of the WinOS2 application. Data files are only copied or moved if a directory along the path of the data file does not meet the FAT 8.3 naming standard, and you have selected a Long File Names option.

It is not necessary to set ZOMBIE_DIR for the Zombie WinOS2 Program object to function correctly. You only need to set this environment variable if you want to alter the default behavior. The default behavior is: files are moved or copied to the root directory of the drive of the data file - UNC data files are copied to the root directory of the boot drive.

If you choose to set ZOMBIE_DIR, the ideal place is on the Environment page of the Zombie WinOS2 Program object, provided you have DragText installed. (One of the features of DragText is the addition of an Environment page to Program objects.) This allows you to set a different directory for each Zombie WinOS2 Program object, meaning each WinOS2 application, as shown in the figure below.

[[Image:]]

If you don't have DragText installed, or don't need the flexibility of specifying a different directory for each WinOS2 application, you should set ZOMBIE_DIR in your CONFIG.SYS file as shown in the example below.

SET ZOMBIE_DIR=C:\TEMP


Regardless of where you set ZOMBIE_DIR, all directories on the path in ZOMBIE_DIR must conform to the FAT 8.3 format.

The pound sign ( # ) can be used as a wild-card for the drive letter in ZOMBIE_DIR, as shown below.

ZOMBIE_DIR=#:\ADIR 


When the wild-card is used, the Zombie WinOS2 Program object will place the data file in that path on the same drive as the original data file. This means you will have to create the path specified in ZOMBIE_DIR on each drive that may contain a data file.

If a path is specified in ZOMBIE_DIR, and the path does not exist, it is an error.


Author