In windows there are some files which are invulnerable,like the file which contains the password of the users.Can such file be opened while working on the same OS? On the other hand,if I try to open those files after installing another OS will it open?
I don't think you can do it inside windows without any weird hack.
But you sure can do it (without even having to install a new OS), just boot the PC from a linux boot cd, by doing so, you take the control out of windows.
If you're looking for the SAM file these links will help:
LINUX LIVE CD: (just record it with any CD burner that can record an ISO):