There are other ways, but there is a password reset disc for windows. Which version of windows is it?
edit: I have used
this, or something like it before, but I am unsure if this was the exact one I used.
edit: Actually, I assume you are going to format it? Don't need a password for that. Just put disc in and reboot (might need to alter boot order in BIOS a bit)