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

ID: Q156360


The information in this article applies to:


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 video display metafile (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.

  1. 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.


  2. 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:

    HKEY_LOCAL_MACHINE\SOFTWARE\Classes

    Using Write.exe as an example, you would look for ".wri" under this registry key.


  3. 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:

    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.wri

    The right-hand window will display:
    <No Name> :REG_SZ : wrifile 


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

    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\wrifile

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

    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\wrifile\shell\open\command

    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:
    
         <No Name> : REG_SZ : C:\Program Files\Windows NT\ 
                              Accessories\Wordpad.exe "%1" 


  5. 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:
    
         <No Name> : REG_SZ : C:\<YourDirectory>\Write.cmd %1 

    In Windows NT 4.0 it should look like the following:
    
         <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.


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


Keywords          : nthowto NTSrvWkst 
Version           : WinNT:3.5,3.51,4.0
Platform          : winnt 
Issue type        : kbhowto 

Last Reviewed: January 21, 1999