HOWTO: Associating File Extensions with VID Editors

ID: Q167453


The information in this article applies to:


SUMMARY

This article describes how to associate a file extension in Visual InterDev with Source Editor. For example, associating the file extension .shtml with Source Editor would allow you to double-click on an .shtml file and have it displayed with the proper color coding.


MORE INFORMATION

The example below associates the .shtml file extension with a source editor. Before performing the steps below, make sure Visual InterDev is closed.
WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk.
Use the following steps to associate a file extension with a filetype (this causes the correct icon to appear next to the file in the project):

  1. From the Start menu, click Run, type "regedit" in the text box, and click OK.


  2. Right-click HKEY_CLASSES_ROOT, select New, and click Key.


  3. Name the key .shtml.


  4. Right-click .SHTML, select New, and click String Value.


  5. Name the string value "Content Type."


  6. Double-click (Default) and set the Value data to "htmlfile."


  7. Double-click Content Type and set the Value data to "text/html."


Use the following steps to associate the .shtml file extension with Source Editor:
  1. In RegEdit, go to "HKEY_CURRENT_USER\Software\Microsoft\DevStudio\5.0\ IStudioProject\Editors."


  2. Right-click Editors, select New, and click Key.


  3. Name the key .shtml.


  4. Right-click .shtml, select New, and click String Value.


  5. Name the string value ":Source Editor."


  6. Double-click "(Default)" and set the Value data to ":Source Editor."


NOTE: At the same level in the registry editor as "...\Editors\.shtml," you should see a key named ":Source Editor." If you do not see this key, this example will not work. Source Editor is the editor integrated into Visual InterDev and requires a reinstall of Visual InterDev if it is not registered properly.

Use the following steps to associate the .shtml file extension with HTML (this tells Visual InterDev to treat the file as an HTML file, thereby enabling color coding):
  1. In RegEdit, go to "HKEY_CURRENT_USER\Software\Microsoft\DevStudio\5.0\Text Editor\Tabs\Language Settings\HTML"


  2. Double-click "FileExtensions" and add ";shtml" to the end of the string.


  3. Close the registry and reboot the machine.



REFERENCES

For the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:

http://support.microsoft.com/support/vinterdev/


Keywords          : kbEditor kbide kbVisID kbVisID100 kbGrpASP 
Version           : WINDOWS:1.0
Platform          : WINDOWS 
Issue type        : kbhowto 

Last Reviewed: May 7, 1999