Binary file editing and hardware compatibility

Last Updated on September 30, 2010 by Dave Farquhar

Binary file editing. I’ve recovered many a student’s term paper from munged disks over the years using Norton Disk Edit, from the Norton Utilities (making myself a hero many times). Usually I can only recover the plain text, but that’s a lot better than nothing. Rebuilding an Excel spreadsheet or a QuarkXPress document is much harder–you have to know the file formats, which I don’t.
But at any rate, I’ve on a number of occasions had to run NDE to recover meeting minutes or other documents at work. The sheer number of times I have to do this made me adamantly opposed to widespread use of NTFS at work. Sure, the extra security and other features is nice, but try telling that to an irate user who just lost the day’s work for some reason. The “technical superiority” argument doesn’t hold any water there.

Enter WinHex (www.winhex.com). Now it doesn’t matter so much that the powers that be at work didn’t listen to my arguments. 🙂 (NDE from vanilla DOS would still be safer, since the disk will be in suspended state, but I guess you could yank the drive and put it in another PC for editing.)

For those who’ve never done this before, you can recover data using a brute force method of searching for known text strings that appeared in the file. For example, I once worked on recovering a thesis that contained the line “I walk through a valley of hands.” Chances are, if I search for that, I’m gonna find the rest of the document in close proximity. A Windows-based editor makes this kind of data recovery very nice–search for the string, keeping Notepad open, then copy and paste the strings as you find them.

Knowledge of the underlying filesystem (FAT or NTFS) is helpful but not essential, as is knowledge of the file format involved. If worse comes to worse, you can recover the strings out of the file and have the app open to re-enter it (being aware that you run the risk of overwriting the data, of course).

I found some useful links on the WinHex site detailing certain file formats.

This is a program I suspect I’ll be buying soon, since my need for it is probably more a matter of when rather than if.

———-

From: “James Cooley”

Subject: Tip for tat?

Hi Dave,

I waded through all your views (That’s where all those hits came from!) and I like your style and learned a great deal. Here’s another tip I didn’t see mentioned: in autoexec.bat, add the following: set temp=C:\temp set tmp=C:\temp set tmpdir=C:\temp

You could use the ramdisk drive you mention, of course. I don’t know if this speeds things up, but it sure helps minimize the clutter from most installs when you clean the temp directory periodically. I use C:\temp2 for those disposable downloads because some programs hate extracting into their own directory. Norton Anti-Virus comes to mind: if you run the updates from C:\temp it hangs.

I ordered _UNIX in a Nutshell_ from a recommendation on your site, but got a 500 page tome instead of the 92 pages you mentioned. If you recall the O’Rielly book I’m talking about, could you give me the exact name so I needn’t hunt it down again?

Hope your hands are healing.

Regards,

Jim

———-

Thanks. I’m glad you enjoyed it (but isn’t that an awful lot of reading?)

I’ve seen the tmpdir trick; fortunately not a whole lot of programs use it anymore but that is useful. Thanks.

And yes, as you observe it’s a good idea to use a separate dir for program installs. I try to avoid hanging it directly off the root for speed considerations (a clean root dir is a fast root dir)–I usually stick it on the Windows desktop out of laziness. That’s not the best place for it either, but it’s convenient to get to.

The 92-page book is Learning the Unix Operating System, by Jerry Peek and others. It’s about $12. The 500-page Unix in a Nutshell is useful, but more as a reference. I’ve read it almost cover-to-cover, but I really don’t like to read the big Nutshell books that way. Information overload, you know?

———-

From: “al wynn”

Subject: MAX screen resolution for Win95/98/2000

Do you know the MAXIMUM screen resolutions for Win95/98/2000 (in pixels) ? Which operating systems can support a dual-monitors setting ?

NEC 15′ MultiSync CRT monitors max out at (1280 x 1024 @ 66Hz); for 17′ CRT’s, it’s usually (1600 x 1200 @76Hz). Do you know any 15′ and 17′ models that can handle denser resolutions ? (like (1792 x 1344 @68Hz) or (1920 x 1440 @73Hz) ?

Also, which Manufacturer/Model do you prefer for flat-panel LCD’s ? Which 15′ or 17′ LCD models boast the highest resolution ?

———-

I believe Windows’ limit is determined by the video drivers. So, if a video card ships someday that supports some obnoxious resolution like 3072×2560, Windows should support it. That’s been the case in the past, usually (and not just with the Windows platform–it holds true for other systems as well).

Windows 98 and 2000 support dual monitors.

I’ve never seen a 15″ monitor that does more than 1280×1024, and never seen a 17″ that does more than 1600×1200. I find anything higher than 1024×768 on a 15″ monitor and higher than 1152×864 on a 17″ strains my eyes after a full day of staring at it.

As for flat-panels, I don’t own one so I can’t speak authoritatively. I’d probably buy an NEC or a Mitsubishi if I were going to get one. The price difference between an off-brand flat-panel and a big name is small enough (relative to price) and the price high enough that I’d want to go with someone I know knows how to make quality stuff–I’m not gonna pay $800-900 for something only to have it break after two years. I’m totally sold on NEC, since I bought a used NEC Multisync II monitor in 1990 that was built in 1988. It finally died this year.

A 15″ flat-panel typically does 1024×768, while a 17″ does 1280×1024.

If you found this post informative or helpful, please share it!