This option in the Windows 10 will work only with with Threshold 2 update.
- Download the latest build of windows 10.
- Boot to disk and start installation, when reaching the windows 10 key, skip the part where you need to enter the Windows 10 key.
- Finish the installation so that Windows 10 copy will be installed as an evaluation copy.
- Go to Settings > Update & security > Activation and selecting Change Product Key
- Enter the product key you have from your former windows 7 or windows 8 key and activate the product