Microsoft KB Archive/156360

= Running a 16-bit Application in Separate Memory Space from a File Manager or Explorer Association =

Article ID: 156360

Article Last Modified on 2/26/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows NT Workstation 3.5
 * Microsoft Windows NT Workstation 3.51
 * Microsoft Windows NT Workstation 4.0 Developer Edition
 * Microsoft Windows NT Server 3.5
 * Microsoft Windows NT Server 3.51
 * Microsoft Windows NT Server 4.0 Standard Edition

-



This article was previously published under Q156360





SUMMARY
When you double-click an icon that is associated with a 16-bit application in File Manager or Windows NT Explorer, it is run in a shared memory space virtual DOS machine (VDM) by default. This article details how to run a 16-bit application in a separate memory space based on its association.



MORE INFORMATION
You must first create a batch file or CMD file. This example will illustrate what you can do to have files associated with the editor WRITE start in separate memory space.   Create a file named Write.cmd or Write.bat. Contents of the file should be:

  @echo off start /separate C:\Directory\Write.exe %1%

NOTE: You will have to specify the drive letter and directory where the executable file exists, or place the batch file in a directory and add that directory to your path in your environment variables in Windows NT.  WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

Start Registry Editor (Regedt32.exe) and Edit the registry entry for the file association. Look for the file extension under the following registry key:

Using Write.exe as an example, you would look for ".wri" under this registry key.  Select this entry, and in the right-hand window of Registry Editor, you will see the folder or file type this extension is associated with. For example:

The right-hand window will display:

 :REG_SZ : wrifile   You will find this folder further down in the Classes subkey. For example:

To change the association in the registry, you must change the string located under the following key: (again using Write.exe associations for example)

The value that will appear in the right hand window should be similar to below:

    <No Name> : REG_SZ : Write.exe %1

In Windows NT 4.0 it will look similar to the following:

<pre class="fixed_text">    <No Name> : REG_SZ : C:\Program Files\Windows NT\ Accessories\Wordpad.exe "%1" </li>  Double-click on the value that appears in the right-hand window and edit the string to reflect the new batch file or CMD file association. This will be the batch file you created in step 1.

After you edit the string, it should appear similar to the entry below:

<pre class="fixed_text">    <No Name> : REG_SZ : C:\<YourDirectory>\Write.cmd %1

In Windows NT 4.0 it should look like the following:

<pre class="fixed_text">    <No Name> : REG_SZ : C:\<YourDirectory>\WRITE.CMD "%1"

NOTE: The quotation marks in the Windows NT 4.0 registry setting C:\<YourDirectory>\ reflect the drive and directory structure to where your batch or CMD file exists. </li></ol>

Additional query words: 16-bit separate memory space association file manager explorer

Keywords: kbhowto KB156360

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.