~lucidiot's wiki

Microsoft Works Task Launcher

The Microsoft Works Task Launcher, sometimes just called Microsoft Works, can display events from the Works Calendar, keep a history of files edited with Microsoft Works, and allows the user to start all of the programs of the Works suite in different ways.

A Quick Launch panel lets you open Word Processor, Spreadsheet or Database directly, and if they are installed, it may also include Microsoft Picture It!, later known as Digital Image, or Microsoft Money. I think the Task Launcher was designed to tie the many products thrown together within the Works Suite, which also included Encarta, Streets & Trips, Home Publishing, etc. It did support Microsoft Money 2011 Sunset Deluxe and Digital Image 2006, but neither Encarta 2009 French nor Streets & Trips 2011. I do not know how that panel lists all the software and if it would be configurable.

The Programs and Templates tabs both list tasks that you can perform with various programs, but grouped differently. The Programs tab groups tasks by programs, sometimes including an extra task to just start the program and nothing more. The Templates tab groups tasks by categories, like Email & Internet or Travel, and does not include a link to just start a program.

Tasks

Tasks in Microsoft Works have three types:

Regular
Open a file, optionally with some command-line arguments. If the file does not exist, the Task Launcher will ask the user if they want to delete the task entirely.
Online
Open a URL, any URL. It actually supports anything that the Run dialog supports, so you can also open programs, files, or use other protocols like Gopher, Telnet or MSN.
Templates
Load a Works Wizard file within the Task Launcher to let the user select one of multiple templates, then run an EXE with the template as a command-line argument.

Other Microsoft tools can integrate with the Task Launcher to provide their own tasks, so that it truly becomes the dashboard for anything Works’ target audience can do with Microsoft software. This is done by using one WTR or XTR file per application, and letting each app define its tasks, sort them, place them into categories, etc.

On top of providing tasks for its own applications, Works 6 to 8 shipped with some files for Palm and Windows CE synchronisation support via ActiveSync, as well as lots of links to MSN services. Works 9.0 ships without ActiveSync tasks and with less MSN links, but instead includes files for Office 2007 if it installed, including the PowerPoint 2007 Viewer for Office 2003.

XTR files

The Task Launcher looks up a list of XML files to load through the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Works\Launcher\XTRFiles registry key. Each value of that registry key is a path to an XML file. Each value is of a REG_SZ type, and their data usually contains the name of the related application. That data is not actually used at all, so that can be used as a comment for those peeking through the registry.

The XML files have a .xtr extension, and those provided by Microsoft include an XML comment: <!--Created with Mirage WTR Tool version 1.0-->. Since those initialisms are not defined anywhere, my best guess is that XTR means XML Task Registration. The files hold the following information:

  • The locale identifier that this file has been translated into;
  • The application’s details, including an icon, a name, a description, an optional path to an executable and some command line arguments, etc.;
  • One or more tasks, with a name, a description, an icon, a version number, one or more categories, the parameters specific to their types, etc.

Tasks that have a locale identifier other than the one of the installed version of Works will be skipped.

  • Write an XML schema for the XTR files
  • Write some sample XTR files for other programs like Notepad

WTR files

Prior to Microsoft Works 8.0, the Task Launcher looked up a list of tasks to load through the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Works\Launcher\TaskFiles registry key. The default value for that key is not set, and it contains REG_SZ values whose names are a zero-based index, and whose data is a path to a .wtr file.

A .wtr file, which I suppose stands for Works Task Registration, holds the same data as an XTR file, but as UCS-2 strings. I used Word 2002’s Unicode conversion support to open a WTR file and inspect it, since Windows 98SE’s Notepad is not happy with it.

Document the WTR file contents

Cache

The XTR files are a static source of tasks, but tasks may also be dynamically added. WkDStore.exe, the Works Data Store, runs alongside all Works applications, allowing them to retrieve and store tasks and recently used files. You can view its type library using OleView, one of the tools distributed along with Visual Studio 6 and the Windows SDK.

To store those dynamically updated tasks, the data store saves everything to a binary file under %AppData%\Microsoft\Works\wklntsk1.dat.

Write a Kaitai Struct schema and a documentation for the wklntsk1.dat file

Personal Templates

Works Word Processor, Spreadsheet and Database all support saving templates. On all three, saving a template causes the Task Launcher’s cache file to be updated to inject some additional tasks that do not exist in the XML files. Those tasks are categorized under WorksPersonalTemplate, and the Task Launcher takes care of displaying the correct string to the user, so in English Personal Templates. The original XTR files are not updated.

As for how templates are saved however, the Word Processor behaves differently than the other two. In Works Spreadsheet and Database, there are no specific file extensions or formats for templates. To save a template, the Save dialog includes a Template… button. Clicking this button opens a different, simpler dialog box, where you can type the template’s name and optionally check a box to set this template as the default template for all new documents from now on.

Your template will be saved as a regular document under %AppData%\Template, not even using the %AppData%\Microsoft\Works directory that other parts of Works uses. To configure the default template for blank documents, the HKEY_CURRENT_USER\Software\Microsoft\Works\9.0\Template Section key holds two values: SSDefaultTemplate defines the path to the default template for Works Spreadsheet, and DBDefaultTemplate defines the one for Works Database.

In the Word Processor, you can save a template by selecting the .wpt option in the Save dialog. When selecting this option, the dialog box changes immediately to the templates directory, but you can save elsewhere. If you save elsewhere, the Task Launcher will also include a task for your template.

My Projects Organizer

The Task Launcher is not just a dashboard with a bunch of shortcuts; it is a to-do list manager too. The Projects tab, whose full name is My Projects Organizer according to the History tab, can display to-do items grouped into projects. Various project templates are available, and users can also just create blank projects. Both projects and to-do items have optional due dates, and configuring one will automatically add events to the Works Calendar to give reminders.

Projects just have a name, an optional due date and to-do items. To-do items have a text, an optional due date, a multiline text box for notes, and can optionally be associated with an action: using any Works task, opening any local file, or opening a URL. The user interface says Works template but you can use any task of any type.

Projects are stored within the My Projects folder under My Documents as XML files with a .wpj extension.

.NET Lists service

The XML documents are using an altered version of the Lists service of the abandoned .NET My Services project, also known by its codename Hailstorm, which says something about when the Projects feature must have been developed: sometime in 2001.

Hailstorm was intended to be a bunch of XML Web services: HSDL, an initialism that is never properly defined, defines a way to query an SOAP endpoint to query, create, update, replace, delete, or subscribe to changes in the data stored in the various services. There were a lot of those services. They are listed and documented in detail in Microsoft .NET My Services Specification, ISBN 9780735615564, and an abandoned patent application, which had been rejected because it was so vaguely written that it conflicts with Office 97, includes a figure that lists 14 services.

Hailstorm was eventually abandoned because of yet another case of anti-trust troubles for Microsoft. Nowadays, Microsoft, Google and others do provide all of the listed services, with Google having the monopoly over consumers and Microsoft over businesses. The hailstorm just got calmer and became a regular boring cloud instead.

Some of the XML schemas for the Hailstorm services were recovered and published on GitHub. Two schemas are however missing: the Lists and Notifications services.

  • Write the XML schemas for the .NET Lists and Notifications services
  • Learn more about Hailstorm and move this to a dedicated wiki page
  • Look for mentions of the Hailstorm schemas on Sourcegraph and in the leaked Windows XP source code

Works extensions

My Projects Organizer uses a separate XML namespace to add an extension to the original .NET Lists service. This extension provides the file association feature on project to-dos, where you can assign a template, an existing local file or a URL to your task.

Write the XML schema for the Microsoft Works extensions to the .NET Lists service

Wizards

Wizards are what typical software would call templates. They are used within the XTR files. They are found under the <LCID>\Wizards directory, where <LCID> is a locale identifier. They use the .wwp, .wws and .wwd extensions, which distinguish wizards for the Word Processor, Spreadsheet or Database respectively. They are nothing more than a normal document of their respective software; you can copy them, rename them to .wps, .xlr or .wdb, and use them like that.

My Projects Organizer just has its own project templates stored as .wpj files, the default extension, in that same directory. You can double-click them to open them, but they do not seem to be editable within Works, even when removing the read-only attribute from the file.

History

The History tab shows the recently opened and saved files from within any of the Microsoft Works applications. Each entry can be removed individually, or the whole history can be cleared. Just like with tasks, the separate Data Store process manages this history. Entries do not appear in this history if it has been disabled by the task in an XTR file.

The history is saved under %AppData%\wklnhst.dat, again ignoring the Microsoft\Works directory. Its structure is rather simple:

Count Entry 1 Entry 2 ...

First, a 32-bit little endian integer, for the amount of history entries stored in the files. Then a series of said history entries, structured like this:

App ID Task ID Path length Path
App ID
32-bit little endian integer. The application ID, as written in the XTR files and the task cache file.
Task ID
32-bit little endian integer. The task ID, as written in the XTR files and the task cache file. This is used to associate a file as having been created using a specific template. If this file is not associated with a template, this value is set to zero.
Path length
32-bit little endian integer. The length of the file’s path, in characters. Since the file path is encoded as UTF-16, you need to multiply this by two to get the bytes.
Path
UTF-16LE string. Path to the file referenced by the history entry.

You can download the Kaitai Struct schema for the Works Data Store History file.