Lol. Awesome YouTube video.
I once made a VB program to play minesweeper. It managed to beat all difficulty levels in 1-2 seconds. It usually took a bit longer on hard though.
It was particularly smart, just sent click messages to the board assuming some grid offset and spacing, then checked screen colors for the numbers, since each number was a unique color. I believe there was a certain pixel I found that was set for each digit, so I didn't have to scan more than 1 pixel per cell.
Using it's own scanned copy of the board, it just used fairly simple logic to determine where all the obvious mines were. It occasionally got stuck, such as in cases like the first game where you have no way of knowing. In that case, it would either wait for you to click, or you could set it to guess on it's own.
I doubt it'd work with the new version though, since the board scanning depended quite heavily on the graphical layout, which has since changed from the Window 95 days.
Edit: Btw, to avoid to heartbreaker endings, I usually started each game by clicking each of the corner cells. You're much less likely to get caught in an impossible situation if the corner cells are already dealt with.