Welcome Guest. | Log In| Register | Membership Benefits

  • Email this page E-mail
  • |  Print Print
  • |   Bookmark and Share
  • icon

Win98 WinAlign: WMAlign.bat




NOTE: WMAlign.bat will only work if you have Microsoft Office (95 or 97) installed on your PC. That's because it depends on Walign.exe, which only works when Microsoft Office 95/97 is present. There is a registry patch in the zip file that you can apply to fool Walign.exe into thinking you have Office installed. This patch appears to work safely with Office 2000.See the documentation below for more information.

OK, you've read The Expert's Guide to Windows 98 WinAlign, the WinAlign Frequently Asked Questions, andWinAlign How-To. Now you're ready to align some files for maximum performance! Download WMalign.zip, our free program code alignment tool, and follow the instructions here. We recommend these procedures for experienced users only. You should take steps to guard against data loss in case you have problems.

Reinventing Wheels
Since the Windows 98 Resource Kit comes with a utility called WinAlign.exe that can align programs, why did we create another one? For one, the Resource Kit book costs nearly as much as Windows 98 itself. Many people will not want to buy it just to get the WinAlign utility. Our batch file, WMAlign, performs the same basic function of WinAlign by calling the Walign.exe utility that is included with Windows 98.

Here's another reason to reinvent the wheel: If you've visited our WinAlign How-To page (and you should have before you got here) you'll notice that WinAlign can be a mighty dangerous tool. Its command-line defaults make it easy to do something stupid like align every piece of code on your entire hard disk. (We have, ah, verified this in our labs. Right, we meant to do that.) WMAlign is a much simpler tool, and it only affects files in its current directory. You can still mess up your programs with WMAlign if you work at it, but you'll have to do it one directory at a time.

If all this seems awfully complex--well, it is. Microsoft has made it much more difficult than it should be to use the built-in Walign.exe to align programs other than its own, and the WinAlign.exe in the Resource Kit is an accident waiting to happen. I've tried to make things as simple as possible, but I know it's still a chore.

What WMAlign does
Like WinAlign, WMAlign.bat is a command-line utility. When you run WMAlign.bat, it performs the following steps for you:

  1. Creates an UNALIGN directory under the current directory, if it doesn't already exist. Makes a backup copy of each file it will align in the UNALIGN directory. It does this only if a backup copy does not already exist in the UNALIGN directory.


  2. Creates a backup copy of the winali.ini file in the Windows System directory, if it doesn't already exist. The file is named winali.bak.


  3. Generates a list of all the files to be aligned, and places it into a new version of the winali.ini file.


  4. Copies each file to be aligned into the Windows System directory. (Walign.exe will only align files in this directory.)


  5. Runs Walign.exe to align the files.


  6. Copies the now-aligned files back to the current directory.


  7. Saves any messages generated by Walign.exe into the file wmalign.txt in the current directory.

Page 2: 
1 | 2 | 3 Next Page »


Subscribe to RSS


Advertisement






Get InformationWeek in Print

Apply for a free 52-week subscription to InformationWeek (a $199 value)



NOTE: Offer valid for U.S., U.S. possessions, & Canada only.