Home
Calerga
Contact
Support
Google Group
 
Products
Sysquake
SQ Remote
SQ for LaTeX
LyME
LME for PPC
 
Documentation
Download
Applications
Press Releases
Events
News
 

Technical Note 1 - Sysquake and Windows' Registry

In Microsoft Windows 95 and later, a lot of configuration information is stored in a central location called the Registry. This includes the way Windows interacts with applications, such as which application is launched when you double-click a document, what appears in the contextual menu when you right-click a document, or which icon is displayed. Windows knows which application is responsible for a document by looking at its extension, i.e. the characters which follow the dot of the file name (note that usually, Windows does not display the extension).

Note: You can display and modify the Registry with applications such as RegEdit; however, be very cautious about what you do, because some modifications may prevent the system to boot and force you to reinstall Windows. Sysquake does not require the use of RegEdit.

Applications can configure themselves and their documents by adding or changing information in the Registry. Conflicts may arise when several applications claim ownership of the same extension. This documents describes how Sysquake handles the situation.

Sysquake, a family of applications

Sysquake is not just a single application, but a whole family, as shown in the table below.

ApplicationDescriptionFiles
Sysquake The main application which can open and save any SQ and SQD files .sq, .sqd
Sysquake Viewer A limited viewer application which can open SQ files processed by Sysquake Signer .sq
Sysquake Demo The demonstration version of Sysquake, which can open SQ files processed by Sysquake Signer .sq
Sysquake Signer An application which can process SQ files to permit their loading by Sysquake Viewer .sq

Even if no other application expects to handle .sq or .sqd files, a conflict may arise between these four applications which can reside simultaneously on the same computer. For example, a professor can install Sysquake Viewer, use it to view and play with interactive SQ files found on the Web, and decide to buy and install Sysquake and Sysquake Signer to author himself SQ files for his students.

How applications handle the issue

Sysquake, Sysquake Viewer, and Sysquake Demo

All of these applications can store in the Registry some information about .sq and .sqd files and how it handles them. When they are launched, they check whether this information is already registered. If nothing (not a single bit of the relevant information) is found, they register it; otherwise, they do nothing, because the user may already have chosen to register another application and would not like to see his settings modified. Each application has a menu entry named "Handle SQ Files" which can be selected to specify that it should handle SQ files. This menu entry is enabled and unchecked when the Registry should me modified, and disabled and checked when the Registry is up to date.

The information permits Windows to launch the application when an SQ or SQD file is double-clicked, to print the documents when the contextual menu Print is selected or when the file is dragged onto a printer icon, and to find the application when you just type its name (without its path) in "Run...".

Sysquake Signer

Sysquake Signer has a very limited user interface. When it is launched, it always registers the information which adds a Sign contextual menu entry for SQ files, and its own path. If another application of the Sysquake family has not registered the association between SQ files and the .sq extension, the contextual menu entry will never be displayed.

What is stored in the Registry

The figure below describes exactly what Sysquake stores in the Registry. The full path of applications is denoted by "...".

HKEY_CLASSES_ROOT
  .sq
    (Default)                 SysQuake.SQFile
    Content Type              application/x-sysquake
  .sqd
    (Default)                 SysQuake.SQDFile
  MIME
    Database
      Content Type
        application/x-sysquake
          Extension           .sq
  SysQuake.SQDFile
    (Default)                 SysQuake SQD File
    DefaultIcon
      (Default)               ...\SYSQUAKE.EXE,2
    shell
      open
        command               ...\SYSQUAKE.EXE "%1"
  SysQuake.SQFile
    (Default)                 SysQuake SQ File
    DefaultIcon
      (Default)               ...\SYSQUAKE.EXE,1
    shell
      open
        command               ...\SYSQUAKE.EXE "%1"
      print
        command               ...\SYSQUAKE.EXE /p "%1"
      printto
        command               ...\SYSQUAKE.EXE /pt "%1" "%2" "%3" "%4"
      Sign
        command               ...\SQSIGNER.EXE "%1"
HKEY_LOCAL_MACHINE
  SOFTWARE
    Microsoft
      Windows
        CurrentVersion
          App Paths
            SYSQUAKE.EXE
              (Default)       ...\SYSQUAKE.EXE

Here is what Sysquake Viewer registers.

HKEY_CLASSES_ROOT
  .sq
    (Default)                 SysQuake.SQFile
    Content Type              application/x-sysquake
  MIME
    Database
      Content Type
        application/x-sysquake
          Extension           .sq
  SysQuake.SQFile
    (Default)                 SysQuake SQ File
    DefaultIcon
      (Default)               ...\SQVIEWER.EXE,1
    shell
      open
        command               ...\SQVIEWER.EXE "%1"
        ddeexec               [open("%1")]
HKEY_LOCAL_MACHINE
  SOFTWARE
    Microsoft
      Windows
        CurrentVersion
          App Paths
            SYSQUAKE.EXE
              (Default)       ...\SQVIEWER.EXE

Here is what Sysquake Demo registers.

HKEY_CLASSES_ROOT
  .sq
    (Default)                 SysQuake.SQFile
    Content Type              application/x-sysquake
  .sqd
    (Default)                 SysQuake.SQDFile
  MIME
    Database
      Content Type
        application/x-sysquake
          Extension           .sq
  SysQuake.SQFile
    (Default)                 SysQuake SQ File
    DefaultIcon
      (Default)               ...\SQDEMO.EXE,1
    shell
      open
        command               ...\SQDEMO.EXE "%1"
HKEY_LOCAL_MACHINE
  SOFTWARE
    Microsoft
      Windows
        CurrentVersion
          App Paths
            SYSQUAKE.EXE
              (Default)       ...\SQDEMO.EXE

Here is what Sysquake Signer registers.

HKEY_CLASSES_ROOT
  SysQuake.SQFile
    shell
      Sign
        command               ...\SQSIGNER.EXE "%1"
HKEY_LOCAL_MACHINE
  SOFTWARE
    Microsoft
      Windows
        CurrentVersion
          App Paths
            SQSIGNER.EXE
              (Default)       ...\SQSIGNER.EXE
Copyright 1998-2007, Calerga.
All rights reserved.