Base de Conhecimento

  1. Início
  2. How To
  3. How to register additional extension for Source Preview
Criado
Modificado

Artigo 2674

How to register additional extension for Source Preview

How to register an additional file extension for the Source Preview Handler.

In this example we register the handler for the .xyz file extension:

Register extension in registry

  1. Open regedit.exe
  2. Under the shellex sub key, create a new sub key:
    HKEY_CLASSES_ROOT\SystemFileAssociations\.xyz\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}
  3. Under this key set the (Default) value to:
    {7091AD29-4F19-4935-8BB2-400A630D26C4}
If another application is already associated with the file type .xyz:
  1. Go to HKEY_CLASSES_ROOT\.xyz
  2. Read the value from the (Default) key. e.g. MyApp
  3. Go to HKEY_CLASSES_ROOT\MyApp
  4. Under the shellex sub key, create a new sub key:
    HKEY_CLASSES_ROOT\MyApp\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}
  5. Under this key set the (Default) value to:
    {7091AD29-4F19-4935-8BB2-400A630D26C4}

Add extension to langs.model.xml

  1. Edit %programdata%\SmartFTP\SourcePreview\langs.model.xml
  2. Add the extension in an existing Language node to the ext attribute. For example if you want to add the extension to the xml lexer:
    <Language ext="xml xsml xsl xsd kml wsdl xyz" name="xml" commentEnd="-->

References

  1. MSDN: How to Register a Preview Handler

Palavras-chave

Artigos Relacionados


What do you think about this topic? Send feedback!