Stage 4: My Computer and Control Panel Web view customization

You can customize how My Computer and Control Panel appear on your company's computers by customizing the files that serve as templates for them. Then if the user installs the Windows Desktop Update, My Computer and Control Panel can appear as Web pages. One reason to customize these folders is to provide instructions, a company logo, or links to support or corporate sites.

To do this, you would use the following template files:

If you have installed the Windows Desktop Update on your computer, these files are located in the C:\Windows\Web or C:\Windows\NT folder. You can open them using a text editor, such as Notepad or an HTML editor. It's recommended that you make a back-up copy of these files before working with them, so you can restore them to their original state if needed.

There are several ways you can modify these files to suit your company's needs. You can add your own links or graphics, change colors, and even determine which contents (icons and file names) are displayed. For example, you could choose not to display the icons in Control Panel, but provide graphical buttons the user could click for only those settings you choose to make available.

These files use ActiveX Scripting—such as JavaScript, JScript, or Visual Basic Scripting Edition (VB Script). The existing Mycomp.htt and Controlp.htt files, and other files related to the desktop—Folder.htt and Printers.htt—use JavaScript. You can modify some aspects of these files without scripting, or if you're familiar with scripting, you can add or change the scripting to meet your needs.

These template files are very similar to .htm files, except for three variables—%THISDIRNAME%, %THISDIRPATH%, and %TEMPLATEDIR%—which are processed through a MIME filter and replaced with the correct file or path information. These variables are useful when you specify links to external files, such as graphics. Although these template files are located in the C:\Windows\Web or C:\Windows\NT folder, they are processed in the \Temp folder, so the path information is necessary to ensure that links to other items work.

An important issue is to ensure that the customized versions of My Computer and Control Panel resize the display in accordance with your users' screen resolutions, and that they display properly. In the Mycomp.htt and Controlp.htt files, the following syntax is used to ensure proper resizing:

<script language="JavaScript">
  window.onresize = fixSize;
</script>

These files use the FileList object to represent the contents (icons and file names) of My Computer and Control Panel. In My Computer, a pie chart showing the amount of free space available is represented by the PieChart object. These objects are optional.

For more information about WebViewFolderContents objects, see the Internet Client SDK documentation. To view this information, click Internet Tools and Technologies, click Windows Shell API, click Shell Object for Scripting and Visual Basic, and then click Web View Scripting Objects.

In My Computer and Control Panel, Infotips from the registry are displayed when the user points to the item. The Infotips provide a brief description of the item.

You can also modify the Printers.htt (Printers) and Folders.htt (default Web view for folders) template files in the C:\Windows\Web or C:\Windows\NT folder on your computer or on your users' computers. These file cannot be included in your customized IEAK package.

If you want, you can provide an HTML file instead of modifying the *.htt files. To do this, you need to change the associated PersistMoniker references in the registry to PersistFile, and point the references to your customized file. Note that editing the registry can cause harm to an operating system, and should be performed at your own risk.