Begin README

This commit is contained in:
~lucidiot 2021-11-11 02:24:36 +01:00
parent bad1232084
commit 9719958ea9
1 changed files with 125 additions and 0 deletions

125
README.md Normal file
View File

@ -0,0 +1,125 @@
# 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][pubwiz-intro], 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][pubwiz-reg]
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][pubwiz-bra]
`chn`
: China. [Last archived version][pubwiz-chn]
`deu`
: Germany. [Last archived version][pubwiz-deu]
`esp`
: Spain. [Last archived version][pubwiz-esp]
`fra`
: France. [Last archived version][pubwiz-fra]
`gbr`
: Great Britain. [Last archived version][pubwiz-gbr]
`hkg`
: Hong Kong. [Last archived version][pubwiz-hkg]
`jpn`
: Japan. [Last archived version][pubwiz-jpn]
`prt`
: Portugal. [Last archived version][pubwiz-prt]
`usa`
: United States. [Last archived version][pubwiz-usa]
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:
* [Using the Transfer Manifest][pubwiz-manifest]
* [Transfer Manifest Schema][manifest-schema]
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!
[manifest-schema]: https://docs.microsoft.com/en-us/windows/win32/shell/manifest-schema
[pubwiz-bra]: http://web.archive.org/web/20090414051215/http://shell.windows.com:80/publishwizard/bra.xml
[pubwiz-chn]: http://web.archive.org/web/20051231051534/http://shell.windows.com:80/publishwizard/chn.xml
[pubwiz-deu]: http://web.archive.org/web/20041210182227/http://shell.windows.com:80/publishwizard/deu.xml
[pubwiz-esp]: http://web.archive.org/web/20100219221739/http://shell.windows.com:80/publishwizard/esp.xml
[pubwiz-fra]: http://web.archive.org/web/20020628090510/http://shell.windows.com:80/publishwizard/fra.xml
[pubwiz-gbr]: http://web.archive.org/web/20020112172552/http://shell.windows.com:80/publishwizard/gbr.xml
[pubwiz-hkg]: http://web.archive.org/web/20040206014021/http://shell.windows.com:80/publishwizard/hkg.xml
[pubwiz-intro]: https://docs.microsoft.com/en-us/windows/win32/lwef/pubwiz-intro
[pubwiz-jpn]: http://web.archive.org/web/20121222060648/http://shell.windows.com:80/publishwizard/jpn.xml
[pubwiz-manifest]: https://docs.microsoft.com/en-us/windows/win32/lwef/pubwiz-manifest
[pubwiz-prt]: http://web.archive.org/web/20041129111113/http://shell.windows.com:80/publishwizard/prt.xml
[pubwiz-reg]: https://docs.microsoft.com/en-us/windows/win32/lwef/pubwiz-reg
[pubwiz-usa]: http://web.archive.org/web/20130829081831/http://shell.windows.com:80/publishwizard/usa.xml