This article explains how to set up file and printer sharing on a home network with computers running different versions of Windows.

Watch this video to learn how to network home computers running different versions of Windows (6:15)

If all computers on your home network are running Windows 7, create a homegroup

By far, the easiest way to set up file and printer sharing on a home network is to create a homegroup. A homegroup links computers on your network so that you can share pictures, music, videos, documents, and printers. You can help protect a homegroup with a password, and you'll always be able to choose what you share with the group. If all of the computers that you want to network are running Windows 7, creating a homegroup is the recommended method.

HomeGroup is available in all editions of Windows 7. In Windows 7 Starter and Windows 7 Home Basic, you can join a homegroup, but you can’t create one.

After you create a homegroup, you're done, and you can skip the rest of this article. If you aren’t ready to upgrade all of your computers to Windows 7, you can still get your network running smoothly. Read the following sections to learn how to address the differences between the versions of Windows

If your network contains computers running different versions of Windows, put all computers in the same workgroup

Let's assume that you've already set up the physical network itself. If you haven’t, see What you need to set up a home network.

After your network is set up, the next step is to fine-tune it so that all the computers can find each other—something you'll need if you want to share files and printers.

If computers running Windows XP are part of your network, it’s important to use the same workgroup name for all of the computers on your network. This makes it possible for computers running different versions of Windows to detect and access each other. Remember that the default workgroup name is not the same in all versions of Windows.

To find or change the workgroup name on a computer running Windows XP

  1. Click Start, right-click My Computer, and then click Properties.

  2. In System Properties, click the Computer Name tab to see the workgroup name. To change the name, click Change, type the new name in Computer name, and then click OK.

To find the workgroup name on a computer running Windows Vista or Windows 7

  1. Open System by clicking the Start button Picture of the Start button, right-clicking Computer, and then clicking Properties.

  2. The workgroup name is displayed under Computer name, domain, and workgroup settings.

To change the workgroup name on a computer running Windows Vista or Windows 7

  1. Open System by clicking the Start button Picture of the Start button, right-clicking Computer, and then clicking Properties.

  2. Under Computer name, domain, and workgroup settings, click Change settings.

  3. In System Properties, on the Computer Name tab, click Change.

  4. In Computer Name/Domain Changes, in Workgroup, type the name of the workgroup you want to use, and then click OK. You will be prompted to restart your computer.

Picture of the System window
The workgroup name is displayed in the System window

Set the network location to Home or Work

Next, check the network location on all computers running Windows Vista or Windows 7. The network location is a setting that allows Windows to automatically adjust security and other settings based on the type of network that the computer is connected to. For more information, see Choosing a network location.

There are four network locations:

  • Home. The computer is connected to a network that has some level of protection from the Internet (for example, a router and a firewall) and contains known or trusted computers. Most home networks fall into this category. HomeGroup is available on networks with the Home network location.

  • Work. The computer is connected to a network that has some level of protection from the Internet (for example, a router and a firewall) and contains known or trusted computers. Most small business networks fall into this category.

  • Public. The computer is connected to a network that's available for public use. Examples of public network types are public Internet access networks, such as those found in airports, libraries, and coffee shops.

  • Domain. The computer is connected to a network that contains an Active Directory domain controller. An example of a domain network is a network at a workplace. This network location is not available as an option and must be set by the domain administrator.

For your home network, make sure that the network location type is set to Home. Here's how to check:

  • Open Network and Sharing Center by clicking the Start button Picture of the Start button, and then clicking Control Panel. In the search box, type network, and then click Network and Sharing Center.

The network location type is displayed below the network name.

Picture of Network and Sharing Center
The network location type is displayed in Network and Sharing Center

If your network type is public, click Public network, and then select the network location you want.

Warning

  • You should only change a network to Home or Work if it's a known and trusted network, such as your home or small business network. Changing a network in a public place to Home or Work can be a security risk because it allows other people on the network to see your computer.

Make sure your firewall allows file and printer sharing

If you're using Windows Firewall, you can skip this section, because Windows Firewall automatically opens the correct ports for file and printer sharing when you share something or turn on network discovery. (For more information about network discovery, see What is network discovery?) If you're using another firewall, you must open these ports yourself so that your computer can find other computers and devices that have files or printers that you want to share.

To find other computers running Windows Vista or Windows 7, open these ports:

  • UDP 3702

  • UDP 5355

  • TCP 5357

  • TCP 5358

To find other computers running earlier versions of Windows, and to use file and printer sharing on any version of Windows, open these ports:

  • UDP 137

  • UDP 138

  • TCP 139

  • TCP 445

  • UDP 5355

To find network devices, open these ports:

  • UDP 1900

  • TCP 2869

  • UDP 3702

  • UDP 5355

  • TCP 5357

  • TCP 5358

To make HomeGroup work correctly between computers running Windows 7, open these ports:

  • UDP 137

  • UDP 138

  • TCP 139

  • TCP 445

  • UDP 1900

  • TCP 2869

  • UDP 3540

  • TCP 3587

  • UDP 3702

  • UDP 5355

  • TCP 5357

  • TCP 5358

Turn on additional file and printer sharing options

By changing your network location to Home or Work, network discovery is automatically turned on . You can also turn on these sharing options individually:

  • Network discovery

  • File sharing (in Windows 7, this is automatically turned on when you share a file or folder)

  • Public folder sharing

When you turn on these options, your computer can:

  • Find other computers and devices on your home network and have other computers find your computer

  • Share its files and folders

  • Share its Public folders

Note

  • Password-protected sharing is a special option that's discussed below.

To turn on network discovery, file and printer sharing, and public folder sharing in Windows 7

  1. Open Advanced sharing settings by clicking the Start button Picture of the Start button, and then clicking Control Panel. In the search box, type network, click Network and Sharing Center, and then, in the left pane, click Change advanced sharing settings.

  2. Click the chevron Picture of the chevron icon to expand the Home or Work network profile.
  3. Select the options to turn on network discovery and file sharing.

  4. Under Public folder sharing, do one of the following:

    • To share your Public folders so that people on other computers on the network can open files in them but can't create or change files, click Turn on sharing so anyone with network access can open files.

    • To share your Public folders so that people on other computers on the network can open files in them and also create or change files, click Turn on sharing so anyone with network access can open, change, and create files.

      Click Save changes. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

To turn on network discovery, file sharing, public folder sharing, and printer sharing in Windows Vista

  1. Open Network and Sharing Center in Control Panel.

  2. Under Sharing and Discovery, click the chevron Picture of the chevron icon next to File sharing to expand the section, click Turn on file sharing, and then click Apply. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
  3. Click the chevron Picture of the chevron next to Public folder sharing to expand the section, and then do one of the following:
    • To share the Public folder so that people on other computers on the network can open files in it but can't create or change files, click Turn on sharing so anyone with network access can open files, and then click Apply. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation. This is the default setting.

    • To share the Public folder so that people on other computers on the network can open files in it and also create or change files, click Turn on sharing so anyone with network access can open, change, and create files, and then click Apply. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

  4. Click the chevron Picture of the chevron next to Printer sharing to expand the section, click Turn on printer sharing, and then click Apply. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

Consider using password-protected sharing

Password-protected sharing is a more secure method of sharing files and folders on a network, and it is enabled by default. With password-protected sharing enabled, people on your network can't access shared folders on other computers, including the Public folders, unless they have a user name and password on the computer that has the shared folders. They will be prompted to type a user name and password when accessing the shared folders.

For quicker access, you might want to have matching user accounts on all your computers. For example, Dana wants to use password-protected sharing to more securely share files and printers between her two computers. On Computer A, she has the user account "Dana22" and the password "Fly43$." If she sets up that same user account and password combination on Computer B, she can more quickly access shared files on Computer B. If Dana changes the password on one of these computers, she must make the same change on the other computer.

To turn on password-protected sharing in Windows 7

  1. Open Advanced sharing settings by clicking the Start button Picture of the Start button, and then clicking Control Panel. In the search box, type network, click Network and Sharing Center, and then, in the left pane, click Change advanced sharing settings.

  2. Click the chevron Picture of the chevron icon to expand the Home or Work network profile.
  3. Under Password protected sharing, click Turn on password protected sharing, and then click Save changes. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

To turn on password-protected sharing in Windows Vista

  1. Open Network and Sharing Center in Control Panel.

  2. Under Sharing and Discovery, click the chevron Picture of the chevron icon next to Password protected sharing to expand the section, click Turn on password protected sharing, and then click Apply. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

To share a file or folder

In any version of Windows, you can right-click a file or folder, click Share, and then select the people or groups you want to share with. You can also assign permissions so that those people can or cannot make changes to the file or folder you shared. For more information, see Share files with someone.

Using the network map

The network map in Network and Sharing Center is a graphical view of the computers and devices on your network, showing how they're connected and including any problem areas. This can be helpful for troubleshooting. Before a computer running Windows XP can be detected and appear on the network map, you might need to install the Link-Layer Topology Discovery (LLTD) protocol on that computer. For more information, go to Network Map Does Not Display Computers Running Windows XP on the Microsoft website.

If the LLTD protocol is installed but computers running Windows XP still don't appear on the network map, firewall settings could be preventing Windows from detecting them. Check the firewall settings and make sure that file and printer sharing is enabled. To learn how to do this, if you're using Windows Firewall, open Help and Support and search for "Enable file and printer sharing." Open the Help topic, and then scroll to the end. If you're using another firewall, check the information that came with your firewall.

Article ID: MSW700032