Share files on computer that has 2 network cards one internet connection and one LAN

Problem description
Windows 7 Homegroups are works badly on a computer with two or more network connections. ( See windows 7 internal message when trying to do so ).
Generally it is difficult to share files/ network with a second network card in windows 7.
Connecting a laptop or other computer to another using a cross-over cable or straight cable (with autosense) is difficult, since windows 7 by default makes that connection into a "Public network location"
( See "Connect two computers using a crossover cable" guide on microsoft for windows vista). This also applies to wireless network card connections
In both the homegroup and the normal "workgroup" way of sharing files, even after getting the network location to your second pc to become "work" or "home", it will reset after reconnecting your first ( internet ) connection or rebooting your pc(s).


1. Do not use homegroup sharing. Use workgroup file sharing
2. Force network location for your second network card to "Private".
3. Possibly you need to reset Winsock
4. Activate file sharing for Home and Work ("Private") networks only, not public and only for the right network card. See to that network location becomes "Work".
5. Check firewall to allow the traffic

Detailed instructions

If you have a homegroup, leave it:
Go to Control Panel\Network and Internet\Network and Sharing Center -
Homegroup . Leave the homegroup.

Setup your computer name and workgroup
Control Panel\System and Security\System - Click "Change settings"
Click "change" and make sure your computer has a name, if not, then fill in a name. Choose "Workgroup" and replace the name with your own choice. Do the same on the other PC. Make sure it has the same workgroup name but a unique computer name.

Force the second network card ( connected to your laptop or second pc )
to become a "Private network location":

1. Click "Start button"
2. Search for secpol.msc
Under Security Settings, select "Network List Manager Policies" and then select the network name from the displayed names
Right-click and select Properties and set the "Location type" to Private.

Reset winsock to make sure you don't run into any problems accessing computers on the network:

Type cmd in the Start Search box, right-click cmd.exe, click Run as administrator, and then press Continue.Type netsh winsock reset at the command prompt, and then press ENTER. Close the command prompt. Reboot.

Make sure filesharing is activated for network card 2, connected to your second PC and NOT for the card connected to internet
After reboot, click "Computer>network" You will probably be prompted to activate file and network sharing again and choose network location type ( Public/ Work/ Home). Since you have 2 network connections, and windows 7 only only gives you the choice to either:

  • No, make the network that I am connected to a private network
  • Yes, turn on network discovery and file sharing for all public networks
and it does NOT give you a choice WHICH of the 2 network connection it is referring to, please UNPLUG YOUR INTERNET CONNECTION and choose
  • No, make the network that I am connected to a private network
Then choose the network location to be type "WORK" not "Home" or "Public".
Check that the second network location has changed to "Work".
Note that the icon may not change at first, but the text should indicate "Work".

After that go to:
Control Panel\Network and Internet\Network and Sharing Center\Advanced sharing settings. Choose "Home or Work" Turn on network discovery and file and printer sharing. Turn off password protected sharing.
Choose "Public" and turn off network discovery and file and printer sharing.

Other issues that you might have to resolve:

Set a set ip address on the 2:nd network card ex: and on the 2:nd computers card.

Change TCP/IP settings

Make sure the windows firewall allows all Home/ Work type connections

Control Panel\System and Security\Windows Firewall Click advanced settings, properties, private profile, OFF .

This is my first Troubleshoot guide ever, written after a whole night of frustration and problem solving so please have leniency...:tongue:

This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.