There are a few things you can try. I’ll list those, as well as one technique that will let you avoid this problem completely in the future.
Become a Patron of Ask Leo! and go ad-free!
The death of the installation disc
It’s very common that machines not come with installation discs these days, much as I prefer it otherwise. There are certain things can happen that absolutely require an installation disc.
Some manufacturers will provide that disc, perhaps for a small fee, should you need it. So the first step is to contact the computer’s manufacturer or the retailer that sold you the machine.
Purchasing Windows 7
It may be possible to purchase Windows 7, but there are couple of problems.
One is that I believe you need to resort to the secondary market sites, such as Ebay, to get it. That means you’ll need to be particularly careful of who it is you’re buying from.
Depending on the issue that you’re facing, it’s possible that buying a new copy of Windows 7 still won’t help. What you would probably buy is Windows 7 “Retail“. What you probably have on your machine, however, is Windows 7 OEM. The retail disc will work for some issues but not for others.
While technically against the license terms, you can purchase an OEM disc. But be careful to purchase an OEM disc for your computer, or at least for your computer’s manufacturer. A Windows OEM disc for an HP computer, for example, probably won’t help if you’ve got a Sony.
Repair or recovery discs
On the other hand, it is possible that you don’t need an installation disc. One thing you can try is to boot from a system repair or recovery disc. One may have been provided with your system. If it has been, it may be able to repair the system from a pristine copy that’s typically kept on a hidden partition. You may also be able to reinstall Windows using this disc.
You can certainly reinstall Windows 7 from a retail disc. And if your machine meets the minimum requirements for Windows 8, you could install that instead. However, you need to plan on the installs actually erasing everything that’s currently on your hard drive. If that’s painful, then you should take an image backup first.
You can do that with, for example, Macrium Reflect’s free edition. You’ll need to use another computer to download Macrium Reflect, and then burn the rescue disc. You can then boot from that rescue disc, and actually back up your system to an external drive. After your system has been reinstalled and is working, you would then recover your data from that backup.
A reminder about backups
Finally, since we’re talking about backup software, I need to point out two things:
First, if you had been backing up regularly, none of this would have been an issue. You could simply restore your machine to a backup image taken before it started asking for the install disc.
Second, backup images are actually my strongly recommended antidote for a lack of installation media. As soon as you get a working system, be it a rebuilt system or a brand new one, take a complete system image. Save that somewhere; make a copy of it for good measure.
Then if you ever need to start over for any reason, you can simply restore your machine to that image.