Directories, paths and folders used by Spectrum Lab

Spectrum lab uses various files to store configuration data, calibration files, screenshots, command files, recorded audio files, frequency lists, etc (more on all those files here). For historic reasons (because Spectrum Lab was written long before there was "Vista" and Windows 7), and to keep most (if not all) files used by / written by Spectrum Lab "in one place" (or at least in a common folder, with a few subdirectories), the location of those 'data' files is not where Microsoft would like to have them (somewhere under "C:\Users\Blah\Blubb") !
This document describes where those 'data files' / 'data folders' are, and how you can modify their location without ever touching the windows registry.

In a nutshell:
If you installed Spectrum Lab to its recommended folder as explained here, all data files will be in

  C:\Spectrum


New locations of 'data' folders (since 2010-06, for Vista and Windows 7)

Data folders in Windows 7 and Vista - Help or Hindrance ?

When Microsoft came up with Vista (and all later versions of Windows), they decided to change the location of folders (directories) where users should put "their" data. In contrast to earlier windows version (like XP) the 'Documents and Settings' folder ('Dokumente und Einstellungen' in german) has gone. Instead, there should be folder for each user in the root of drive C.
Much worse, any directory in the former 'Programs' folder, where Spectrum Lab and including ALL its subfolders used to be installed by default, doesn't have write permission for users without an admin account. There may be good reasons to do this, but the ugly consequence is that you cannot have 'all in one place' anymore, and that you cannot make a copy of an installed Spectrum Lab, including all of its (possibly modified) configurations by copying for example C:\Programs\HamRadioSoftware\SpectumLab (including all subdirectories) anymore !

To be prepared for other 'nice surprises' which Microsoft may come up with in future, the following pinciple will be used now (since 2010-06) :

The PROGRAM (Spectrum Lab) and all files which belong to it will (by default) not be installed into the windows 'Programs' / 'Programs (x86) / 'Programme' or whever microsoft wants 'Programs' to be installed anymore.

Instead, by default, Spectrum Lab will be installed into C:\Spectrum.
The actual name of that folder is not so important, but it's important to install it outside the dreadful read-only 'programs' folder (or whatever MS calls it today, or in your language).

Caution:
If you override the 'data' folder for Spectrum Lab by a better, and easier-to-find path, make sure it has write permission later, when running the program with only user access rights (which you should do, for the sake of security). The installer itself doesn't check if a self defined path will have write permission later.

If, for some reason, you chose a totally different path to the executable (Spectrum Lab) and for the 'data' files (configuration, audio files, screenshots, logfiles, etc etc), how does Spectrum Lab know where its "data files" are located ?
The installer generates a simple text file in the program's "executable" folder (no problem, because the installer must have write permission for this folder anyway). This file, called  "data_file_paths.txt"  is used to pass the location of the 'data file' directory from the installer (i.e. InstallSpecLab.exe) to the installed application (here: SpecLab.exe) . See details in the next chapter. For simplicity, and to avoid a lengthy explanation of 'Windows Shell Folders' here (*), let's assume all 'data files' used by Spectrum Lab will be copied into C:\Spectrum by the installer, as a real directory, not some 'virtualized' crap.


(*) To read a deterrent story about 'where an application should place its data files', see
     http://doughennig.blogspot.com/2007/01/finding-paths-for-special-folders.html .


Since the Nullsoft-based installer was dropped in favour of the 'Inno Setup' system, the file 'data_file_paths.txt' will not be automatically created by the installer anymore (if an installer is used at all, since Spectrum Lab was designed to be "portable"). But for backward compatibility, or if you want to have Spectrum Lab's configuration files located outside the folder with the executable (e.g. "C:\Spectrum\SpecLab.exe"), you can either create "data_file_paths.txt" yourself, or copy it from an older installation. Example (contents of "data_file_paths.txt", located in the same directory as the executable):


# File: data_file_paths.txt
# Purpose: Lets SpectrumLab.exe know where all its
#          "data files and folders" are, including 
#          various subdirectories - see manual.
#          If this file does NOT exist in the folder
#          with the executable (SpecLab.exe), the program
#          assumes the 'folder with the executable'
#          is also the 'folder with the data files'.
data_files = C:\Spectrum


In addition to data_file_paths.txt, the location of the configuration file(s) also be modified through the command line (details here ). Parsing of the command line parameters takes place after reading data_file_paths.txt, so the command line argument override the settings in data_file_paths.txt .

How you can find Spectrum Lab's data folders (since 2010-07)

Due to the problems with hidden 'documents' folders (yet another nuisance with windows), the data folder may be difficult to find - especially if SL was installed a long time ago. To locate the base path, open the 'About' box in Spectrum Lab (main menu, 'Help' ... 'About'). The lower part of the 'About' box will show something like the following :

Exec: C:\Programme\Spectrum Lab\SpecLab.exe

Data: C:\Dokumente und Einstellungen\Username\Blah\Blubb\Anwendungsdaten\SpecLab
(old example where SL and its 'data' folders were installed where MS wanted those files to be,
before they reinvented the wheel a couple of times.. for XP, Vista, Win 7, Win 8)

Exec: C:\Spectrum\SpecLab.exe

Data: C:\Spectrum
(newer example where SL and its 'data' folders were installed in the simple default folder,
without 'Blah' and 'Blubb' if that means anything to you ;-)

The 'Exec' field shows the full directory and filename of the executable. In this directory, you will also find the uninstaller, the file data_file_paths.txt, the help system (subfolder 'html'), and possibly a few DLLs which may be required to run Spectrum Lab on your system.

See also:    SpecLab's main index, Keyword index ("from A to Z"), Configuration files and folders (directories).