Description of the Walign.exe and Winalign.exe Tools

ID: Q191655


The information in this article applies to:


SUMMARY

This article describes the Winalign.exe and Walign.exe tools.


MORE INFORMATION

The Winalign.exe and Walign.exe tools optimize the performance of programs by optimizing a program's executable code (binaries). Windows 98 Setup installs the Walign.exe tool, and this tool is used to optimize Microsoft Office version 7.0 for Windows 95 or Microsoft Office 97 programs. The Winalign.exe tool is included in the Windows 98 Resource Kit, and is used to optimize other programs.

Winalign.exe and Walign.exe optimize programs by rewriting a program's file headers, creating a new section table, and then writing file sections, each of which starts on a 4-kilobyte (KB) boundary. The new section table is then updated with this information, and the file headers are also updated to denote the file is now aligned to a 4-KB boundary. By aligning files in this manner, the Windows 98 CacheMap feature can map directly to sections in the cache memory. This can result in significant performance increases by freeing memory.

Winalign.exe maintains a record in the registry to track all of the files it has aligned. Note that files that were not aligned are not noted in this record. This log is stored in the following registry key:


   HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Winalign 


If needed, Winalign.exe uses these entries in the registry to restore realigned binaries to their unaligned state, although these entries are not used for any subsequent realignments. If you run Winalign.exe on a drive that has already been realigned, Winalign.exe only realigns the files that need updating.

You can add the following registry key to have Winalign.exe log file errors in the realignment process:


   HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Winalign\ 
      LogForErrorCase 


The allowable data values are: 1=On, 0=Off.

Additional query words: 98


Keywords          : kbtool win98 
Version           : WINDOWS:98
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: January 23, 1999