If you need to connect two computers but you don't have access to a network and can't set up an ad hoc network, you can use an Ethernet crossover cable to create a direct cable connection.
Generally speaking, a crossover cable is constructed by reversing (or crossing over) the order of the wires inside so that it can connect two computers directly. A crossover cable looks almost exactly like a regular Ethernet cable (a straight-through cable), so make sure you have a crossover cable before following these steps.
Before buying a crossover cable, check your network adapter. Some newer network adapters automatically cross over when they detect that they're connected directly to another network adapter using a regular Ethernet cable.
This works best if both computers are running this version of Windows or Windows Vista.
Plug each end of the crossover cable into a network port on the back of each computer.
On one of the computers that's running this version of Windows, do the following:
Open Network and Sharing Center by clicking the Start button , and then clicking Control Panel. In the search box, type network, and then click Network and Sharing Center.
In the network map at the top of Network and Sharing Center, double-click the Unidentified network icon. (If you have more than one network, this icon will be labeled Multiple networks.)
If network discovery and file sharing are turned off, in Network, click the information bar containing the following message: "Network discovery and file sharing are turned off. Network computers and devices are not visible. Click to change...," and then click Turn on network discovery and file sharing.
If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
For Gigabit Ethernet or token ring networks, you will need a slightly different kind of crossover cable. For more information, contact a cable manufacturer.
Icons for both computers should now be visible in the Network window. Double-click each computer icon to share printers and other resources.
If one of the computers is running Windows XP, it can take some time for that computer to appear in the Network window. You might need to move both computers to the same workgroup. You can do that by changing the workgroup on either computer. To change a workgroup, see Join or create a workgroup. You might also need to turn on file and printer sharing on the computer running Windows XP.