xp-consoles/README.md

6.3 KiB

Windows XP Scripting Consoles

This repository holds some files that were created as part of a project to put JavaScript and VBScript consoles into every single possible place in Windows XP to learn more about how and why ActiveX was made available in so many spots.

Web Wizards

Windows XP introduced publishing wizards, wizards that include a step in which you have to pick an online service provider. The wizard will then load a webpage for that provider and includes an XML file in window.external.Property('TransferManifest'), which can then be edited in JavaScript or VBScript to let the website include info on how to upload files or perform whatever action the user was trying to do.

In the Win32 API, this type of wizard is called a WebWizard. There are three known Web Wizards:

  • The Add Network Places wizard
  • The Web Publishing wizard
  • The Internet Photo Printing wizard

The Visual Studio 2005 setup project provided in this repository allows you to register the JavaScript and VBScript consoles in all three wizards.

Provider registration

Official docs: Registering a Service

To register an online provider, you will need to add a new registry key under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\PublishingWizard\[WIZARD NAME]\Providers\[PROVIDER NAME]. The wizard name is one of the following:

  • Add Network Places: AddNetPlace
  • Web Publishing: PublishingWizard
  • Internet Photo Printing: InternetPhotoPrinting

The provider name is an arbitrary string of your choice. The following values can be included:

DisplayName
The name of the provider shown in the wizard's list.
Description
A short description of the provider, also shown in the wizard's list.
HREF
URL to the first page of the service. file:///, https:// and http:// are known to work. Other protocols have not yet been tested; please report your findings!
If this is missing, then any wizard will instead display the remote location selection page as in the Add Network Places wizard. See Default provider for Add Network Places below.
IconPath
Path to a local file holding an icon. This can use a local .ico file or find an icon a WinPE executable by appending an icon number, for example shell32.dll,-172.
SupportedTypes
Not relevant to the Add Network Places wizard. This holds a list of supported file types, as patterns separated by semicolons: *.htm; *.html; *.css. If nothing is set, then the provider will always be shown. If this value is set, then the provider is only shown when the files selected for publication by the user all match those patterns.

Default provider for Add Network Places

The Add Network Places wizard automatically gets a provider whose name is other. Its registry values do not include HREF, and this is what causes the wizard to display the remote location selection step instead of a web page.

Interestingly, if you remove HREF from a provider in the Web Publishing or Internet Photo Printing wizard, then those wizards can also show the remote locatoin selection step even though it does not make sense there.

Online provider fetching

Upon startup, all three wizards will fetch a file called the provider manifest. This behavior has been observed by inspecting HTTP requests and is not documented. The file is fetched from http://shell.windows.com/publishwizard/[region].xml, where [region] is a three-letter code. Known regions include:

bra
Brazil. Last archived version
chn
China. Last archived version
deu
Germany. Last archived version
esp
Spain. Last archived version
fra
France. Last archived version
gbr
Great Britain. Last archived version
hkg
Hong Kong. Last archived version
jpn
Japan. Last archived version
prt
Portugal. Last archived version
usa
United States. Last archived version

Nowadays, all of these URLs return an HTTP 404 error. To be more precise, every single URL under http://shell.windows.com/publishwizard/* return an HTTP 404, where any other random URL outside of this directory will instead redirect to bing.com. It seems this behavior was intended to prevent the wizards from no longer functioning or timing out even after the online service providers were taken down.

Provider Manifest

Coming soon: an XSD describing the provider manifest.

Transfer Manifest

Official docs:

The official schema is pretty imprecise and lots of experiments using the provided consoles will be required. I will soon write an XML Schema Definition to formalize the Transfer Manifest schema based on the official documentation and the experiment results.

Web Slice

Coming soon!

Windows Media Player Online Store

Coming soon!

Outlook Today

Coming soon!