This article explains how to set up file and printer sharing on a home network with computers running different versions of Windows.
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
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.
Click Start, right-click My Computer, and then click Properties.
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.
Open System by clicking the Start button , right-clicking Computer, and then clicking Properties.
The workgroup name is displayed under Computer name, domain, and workgroup settings.
Under Computer name, domain, and workgroup settings, click Change settings.
In System Properties, on the Computer Name tab, click Change.
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.
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 , 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.
If your network type is public, click Public network, and then select the network location you want.
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.
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
To find network devices, open these ports:
UDP 1900
TCP 2869
To make HomeGroup work correctly between computers running Windows 7, open these ports:
UDP 3540
TCP 3587
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
Password-protected sharing is a special option that's discussed below.
Open Advanced sharing settings by clicking 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.
Select the options to turn on network discovery and file sharing.
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. If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
Open Network and Sharing Center in Control Panel.
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. 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. If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
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.
Under Password protected sharing, click Turn on password protected sharing, and then click Save changes. If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
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.
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
If you’ve previously set up a home network using computers running Windows XP, you’ll find that setting up a network with a mix of computers running Windows XP and Windows Vista will be similar. There are a few important differences though, and understanding what's different will help you avoid some common problems.
This article also covers the settings needed to set up file and printer sharing on your network.
These are the main networking-related differences between Windows XP and Windows Vista:
Default workgroup name
MSHOME in Windows XP Home Edition; WORKGROUP in all other versions
WORKGROUP
Shared folder name
Shared Documents
Public
Simple file sharing
Allowed by default
Not allowed by default—access to shared folders, including the Public folder (if shared), requires a user name and password
Detection and access to computers on the network
Only detects and accesses computers in the same workgroup
Detects and accesses all computers on the network, no matter which operating system they're running or which workgroup they belong to
Place to change settings and preferences
My Network Places
Network folder
Network controls
In various places throughout the operating system
Mostly in Network and Sharing Center
But take heart. If you aren’t ready to upgrade all your computers to Windows Vista, you can overcome these differences to get your network running smoothly. We’ll address the differences listed above and tell you how to handle them. And we’ll tell you where to find the settings that you need to change.
Let's assume that you've already set up the physical network itself. If you haven’t, these two topics will help with that:
What you need to set up a home network
Setting up a home network
When your network is set up, the next step is to fine-tune it so that all the computers can "see" each other—something you'll need if you want to share files and printers.
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:
To find the workgroup name on a computer running Windows Vista:
Open System by clicking the Start button , clicking Control Panel, clicking System and Maintenance, and then clicking System.
To change the workgroup name on a computer running Windows Vista:
Next, check the network location type on all computers running Windows Vista. The network location type is a setting that allows Windows Vista 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 three network location types:
Public. The computer is connected to a network that is available for public use. Examples of public network types are public Internet access networks such as those found in airports, libraries, and coffee shops. (This location type corresponds to the “Public place” network type.)
Private. 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. (This location type corresponds to the “Home” or "Work" network type.)
Domain. The computer is connected to a network that contains an Active Directory domain controller. An example of a domain network type is a network at a workplace.
For your home network, make sure that the network location type is set to Private. Here's how to check:
Open Network and Sharing Center by clicking the Start button , clicking Control Panel, clicking Network and Internet, and then clicking Network and Sharing Center.
The network location type is displayed in parentheses next to the network name.
If your network type is Public, here’s how to change it to Private:
To the right of the network name and location type, click Customize.
In Set Network Location, next to Location type, click Private, click Next, and then click Close.
You should only change a network to Private if it is a known and trusted network such as your home network. Changing a network in a public place to Private can be a security risk.
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 turn on 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, open these ports:
By changing your network location type to Private, network discovery is automatically turned on in the Sharing and Discovery section of Network and Sharing Center. (For more information about network discovery, see What is network discovery?) You should also turn on these sharing and discovery options:
File sharing
Printer sharing
Find other computers and devices on your home network and have other computers find your computer.
Share its folders.
Share its Public folder.
Share its printers.
Password protected sharing is a special option that we'll cover below.
To turn on file sharing, public folder sharing, and printer sharing, follow these steps:
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. If you are 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. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
With password protected sharing enabled, people using other computers on your network can't access your shared folders, including the Public folder, without a user name or password that corresponds to a user account on your computer. (So if you use password protected sharing, you should have matching user accounts on all your computers.)
To turn on password protected sharing, follow these steps:
Having password protected sharing disabled is equivalent to the simple file sharing used in Windows XP.
The network map in Network and Sharing Center is a graphical view of the computers and devices on your network, showing how they are 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 do not appear on the network map, firewall settings could be preventing Windows from detecting it. Check the firewall settings and make sure that file and printer sharing are enabled. To learn how to do this, if you are 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 are using another firewall, check the information that came with your firewall. For more information, see Troubleshoot problems with computers not appearing on the network map.