That's uncommon, that a computer shuts down ("turns off") when you've reached the end of the CD, you're playing. Maybe you mean something else? If not, I'd return the PC for repair.

What program do you use to play that CD? There are many. But most of them require you to "rip" the CD to add it to it's "library". Just playing isn't enough. That didn't really change between Windows Vista and Windows 7.

Kees