Running Nonnative Applications in Windows 2000 Professional
The OS/2 subsystem handles initialization compatibly with native OS/2 and is configurable using some OS/2 configuration commands. Windows 2000 provides APIs with the prefix Win for this purpose.
Initialization of the Subsystem
When the OS/2 subsystem starts for the first time, it proceeds as follows:
It checks the registry for OS/2 subsystem configuration information.
If it finds none, it checks the original Config.sys file and adds that information to the registry.
If the original Config.sys file does not exist or is not an OS/2 configuration file, the subsystem adds the following default information to the registry:
PROTSHELL=c:\os2\pmshell.exe c:\os2\os2.ini c:\os2\os2sys.ini
%systemroot%\System32\cmd.exe
SET COMSPEC=%systemroot%\System32\cmd.exe
- The subsystem updates the environment variable Os2LibPath with path information found in the original Config.sys file. The updated value of Os2LibPath is SystemRoot \System32\os2\dll, which is concatenated with the list of directories specified in the libpath line of the original Config.sys file.
Path information in the original Config.sys file is not entered automatically into the default Windows 2000 path. To enter this path information, use the following procedure.
To enter Config.sys path information into the default Windows 2000 path
Click Start , and then select Settings .
Click Control Panel .
Click the System icon to open it.
In the dialog box that appears, click the Advanced tab.
Click Environment Variables .
In the System Variables list, double click Os2LibPath .
In the Variable Value window that opens, type SystemRoot \System32\os2\dll.
Click OK .
The system appends this information each time a user logs on.
Changing Registry Information
The OS/2 configuration information is stored in the registry, but you can edit it as an OS/2 Config.sys file with an OS/2 text editor. The seven OS/2 configuration commands that are available for editing are discussed in the next subsection.
Important
To change configuration information, you must be logged on as an administrator.
To change configuration information
While running Windows 2000, start an OS/2 text editor in a window.
Open C:\Config.sys.
Edit the configuration information.
Save and close the file.
Quit the editor.
Log off Windows 2000, and then restart your computer.
Note
Windows 2000 retrieves the configuration information from the registry and stores it in a temporary file that you can edit. The new information is stored in the registry.
Available Commands for OS/2 Configuration
Windows 2000 supports only the OS/2 configuration commands shown in the following list:
codepage
country/region
devicename
**devinfo=**kbd
libpath
protshell
set
Some of the commands in this list are processed in special ways, as shown in Table B.10.
Table B.10 Processing of OS/2 Configuration Commands
Command |
Special Processing |
---|---|
devicename |
The device driver specified must be compatible with Windows 2000. The syntax is as follows: |
libpath |
This command appends path information to the OS/2 library path in the Windows 2000 environment. You can use it to add or change the path information in the Os2LibPath variable. |
protshell |
Specifies the command interpreter. However, only the Windows 2000 command interpreter, Cmd.exe, is supported. |
set |
This command is ignored if used with any of these parameters: COMSPEC, PATH, PROMPT, VIDEO_DEVICES, VIO_IBMVGA, or VIO_VGA. |