Disk files vs. Windows Registry

The Read and Write actions in the Storage menu allow you to read from and write to data files or to the Windows Registry. The decision of which medium you should use depends on the task that you want to perform. Below are some considerations, which may help you decide which you want to use:

1. Disk files are sequential. When you write to a disk file you are appending information to a file, in other words the file is a series of values separated by commas, quote marks or lines. These files are very useful if you want to create lists (e.g. student names, pages visited in publication, scores for quiz questions etc.)

2. Disk files can be one entity. In other words, you can keep adding information to the file so that it is a continuation of information, e.g. you could write a letter (although be it in plain text) or the more create (and patient) among you could even build a web page (a web page is after all a plain text document with HTML tags telling the document how to format the information).

3. The Windows Registry is separated into labels. When you read from or write to a Registry file you reference the label that contains the information you want. This makes the registry an ideal place to store information you need to retrieve by name. For example, you could store a users name, address and postcode in separate labels thereby making it easy to return the name or postcode instantly.

4. The Windows Registry is unique to each user. If the user has to log on to the computer by a user name (as in Windows 2000), each user has a separate and unique profile. When they run your publication, the data saved in the Windows Registry is unique to them. Using the previous paragraph’s example, the users name can be retrieved from the registry and displayed in the publication as soon as they enter it. This allows you to retain any user preferences or customisations they have made to your publication from the last time they used the system. For each user, this information will be unique.

5. Experienced users can read data from other Programs Registry entries. If you understand how the HKEY_LOCAL_MACHINE works in the Registry Editor you can search for information that may help the running of your publication. For example, you could check to see if the user has the correct software on their system to run external publications, such as Adobe Acrobat reader.

Note:
You can only read the information. You do not have the ability to write to other programs Registry entry.

Related Topics:

Introducing the Storage Actions

Restrictions Reading and Writing Disk Files