Hit HP.COM and use their chat feature to ask if they have a documented path to 7 that keeps it all working.
In this case I think you should leave it as-is on Vista.
what are the steps to install windows 7 home on an hp pavillion media center m8300f pc?
1. Download all Windows 7 drivers for this machine from the HP site.
2. Buy or download a Windows 7 install disk and a license code.
3. Boot from that disk and install Windows 7.
4. Install all drivers from #1 in the right sequence.
For #3, http://windows.microsoft.com/en-us/windows/installing-reinstalling-windows#1TC=windows-7 tells more. No need to duplicate that here.
first check hp's website and see if they have win7 drivers. If they do then do the following, insert the disk and restart the computer. The setup process should start. If it goes into vista, then restart the computer, enter bios and set the bootorder with your cd/dvd first.
make sure you have an upgrade version of win7. You cannot use one that came with another computer nor can you use one that says for distributions with new computers only.
a couple other things, make sure you copied all files you cannot afford to lose. Make sure you have all registration info for all software you have, and make sure you a backup of your emails incase something goes wrong during the upgrade.