That should do it! If it doesn’t work for some reason, then go to adapter settings in the Network and Sharing Centre on the PC that you’re trying to get online, right-click the ethernet adapter, disable it, then enable it again. Next, click the drop-down under “Home networking connection,” and select the ethernet adapter that’s connecting your two PCs together. In the Properties box, click the sharing tab and tick the “Allow other network users to connect …” box. (You used to have to use a crossover cable, but PCs are clever enough these days to not require one.) Then go to the Network and Sharing Centre in the Control Panel, “Change adapter settings,” right-click the adapter that has the Internet connection (WiFi in my case), and click Properties.
Connect the two computers via a standard ethernet cable.