The easiest way to do this (without getting in to more complicated subject matter) would be to assign static IPs to the interfaces that use the crossover cables.
Let's say we assign PC1
an address of 192.168.151.10
on its ethernet interface (the one using the crossover), and it has 192.168.0.100
on the WLAN. PC2
could have an address of 192.168.151.20
on its ethernet interface and 192.168.0.200
on its wireless interface.
If we access the share with \\192.168.151.20\share
it will most assuredly use the crossover cable instead of the WLAN. If PC2
looks for PC1
by using its hostname (\\PC1\share
) it might look for it on the WLAN instead of the crossover cable, and that's not what we want.
Maybe this will explain it:
(I always imagine computers speak in lolcats and Comic Sans)
Windows 7 is really finicky about shares on public networks. Make sure your sharing settings are set approrpiately:
http://windows.microsoft.com/en-US/windows7/Connect-two-computers-using-a-crossover-cable
I always like to set a password on a local account and access the share that way. It seems to work betting than attempting to coerce Windows in to sharing to the public. When you're asked for the username and password, log in using PC1\lusr
(computer\username) as the username.