21. Using a Windows Network

Windows Was Made to Network

Most homes and offices have more than one computer, and you’ll quickly find that as days go by, you end up using most or all of them. You’ll download a file, and a few days later, when you want to use that file...where is it? You hardly need to ask: If you’re searching for the file on the computer you’re using now, 9 times out of 10 it will turn out to be on some other computer. This is not just a fact of life, it’s a law of nature. But with a network, you can easily access any file and any printer, on any computer, from your own, thus short-circuiting the law—for a while at least. A network also lets everyone in your home or office share printers and an Internet connection, thus saving you time and money.

In traditional desktop apps at least, using files and printers on the network is exactly the same as using files and printers on your own hard drive. The “look and feel” are identical. The only new tasks you have to learn are how to find resources shared by others and how to make your own computer’s resources available to others on the network. In Modern-style apps, you can easily print to networked printers. For files and folders, you might be stuck using local hard disk folders unless the app enables you to browse through arbitrary folders. It depends on how the app was written.

By the way, we use the word resource frequently in this chapter. When we say resource, we mean a shared folder or printer on someone else’s computer, which you can access through the LAN or the Internet. The American Heritage Dictionary defines a resource as “an available supply that can be drawn upon when needed.” That’s actually a perfect description of a network resource: It’s there for you to use—provided that you can find it and that you have permission.

Another word that’s used frequently is share. You might say that you are sharing a printer or folder on your computer with the network, which means you’re making it available to other users on other computers. It’s also fairly common to use the word share as a noun, as in “I saved the document in the network share,” meaning, a shared folder somewhere on the network.

Windows networks work pretty much the same way whether they’re in your home, in a small office, or in a large corporate setting. “Domain” networks managed by computers running Windows Server software, though, might have some additional features. The following are some notable differences you might see on a domain network:

Image The network administrator can set up roaming profiles so that your settings, preferences, Documents folder, and so on are centrally stored on the network and are available to you on any computer on your LAN or even at other network sites.

Image Active Directory (AD) gives you added search functions to find users and printers on your network. These search functions appear as added icons and menu choices that only AD network computers have.

Image The network administrator might use policy functions to limit your access to applications, Windows features, and settings. If you are on a domain network and can’t find an option mentioned in this chapter, ask your network manager if its use has been restricted.

If you are using a home or small office workgroup network, don’t feel left out. Because a workgroup typically has fewer than 10 computers, the searching and management functions provided by AD simply aren’t necessary.

Using Shared Folders in Windows 10

Windows lets you share folders and their contents with other network users. Users within your network can see the folders and, if permission settings allow it, access the files in them just as they would any file on their own hard drives. In the following sections, we show you how to use files and folders shared by other users. Later in the chapter, you learn how to share folders on your own computer.

Browsing Through a Homegroup

Start by clicking the taskbar’s File Explorer icon to open File Explorer. If your computer is a member of a homegroup, on the left side of the File Explorer window, you’ll see the title “Homegroup.” Under this are entries for each user’s account, on each of the homegroup computers. Anyone who has elected to share materials with the homegroup—and whose computer is turned on—will be listed here.

Image If you can’t or don’t want to use a homegroup, skip ahead to “Browsing a Network’s Computers,” p. 456.

Image To see how to set up a homegroup for your Windows 10, 8.1, 8, and 7 computers, seeSetting Up a Homegroup,” p. 406.

The Homegroup list includes accounts for any additional users on your own computer, as well as the users on other computers.

You can open these entries to see what files and folders are being shared, as shown in Figure 21.1. It doesn’t matter whether the other users’ materials are stored in another account on your computer or are on another computer on your network; it works the same way regardless. You can see only materials that users elected to share.

Image

Figure 21.1 If your computer is a member of a homegroup, you can view the materials shared by other members of your group in File Explorer.

If the other users gave the homegroup permission to make changes to the folder, you’ll be able to edit, delete, and rename files and add new files. Otherwise, you’ll just be able to view, read, print, and play the files. If you want to make changes in this case, just drag a copy from another user’s folder into one of your own folders or onto your desktop.

Image To learn how you can share your files with the group, seeSharing with a Homegroup,” p. 473.

Regardless of whether you have a homegroup set up, you can browse through files and folders shared by any networked computer using the Network list, as described next.


Image Note

Computers whose workgroup or domain name is different from yours might take longer to appear, but all computers on your computer’s same physical network subnet should eventually show up. On a large network, such as you’d find in a large business setting, computers on other subnets and those separated by firewalls and routers will not appear. You can still use their resources by typing their share names directly in UNC format, as described later in the section “Network Power User Topics.”


Browsing a Network’s Computers

In any File Explorer window (for example, in the This PC or Documents window), the left pane contains an item titled Network. If you open this item, you’ll see icons for every active computer on your network. (On an enterprise network, where there may be multiple locations or groups of networked computers, you will see only computers on your local network.) You’ll see a screen like the one shown in Figure 21.2.

Image

Figure 21.2 The Network display lets you browse through your network’s resources.

The Network window shows computers with shared folders, shared Media Center libraries, and network hardware. You can browse into any of the folder icons to locate shared files and folders you want to use.


Image Tip

Digging down to the network can take time and effort, so if you use a particular shared file or folder frequently, use one of these methods to retain quick access to it:

Image Create a shortcut—Hold down the Alt key while you drag the file or folder into your desktop. You can leave the shortcut there or move it to some other convenient location.

Image Create a bookmark—Browse to locate a computer or folder. In the File Explorer window’s left or right pane, right-click the computer or folder and select Pin to Quick Access; alternatively, select it, and in the Home ribbon, select Pin to Quick Access.

Image Create a Start menu tile—Right-click a computer, folder, or application icon and select Pin to Start.


When you browse into other Windows 10, 8.1, 8, 7, and Vista computers, you will notice that the entire users folder structure is shared, with the name Users. This folder contains everyone’s user profiles and documents, and it is shared by default. What preserves everyone’s privacy and security is that each user must give other users (or other groups, or everyone) permission to read a folder or file in order for them to even see that it exists. This scheme makes it much simpler to control which items you share, simply by changing the security settings on the files and folders themselves. We address this issue more later in the section “Sharing Resources.”


Image Note

Remember, for all folders shared by Windows 10, 8.1, 8, 7, Vista, and Windows Server 2008 and later, to even see that a folder or file exists inside a shared folder, you must have permission to read the file or view the folder’s contents. In folders shared by other operating systems, you might be able to see the names of files and folders that you don’t have permission to open.


On Windows 10, 8.1, 8, and 7 computers, the Public folder is shared “in place,” meaning it’s found inside the shared Users folder and is not shared separately under its own name, as it was on Windows Vista and XP. The Public Folder Sharing option in the Advanced Sharing Settings page controls whether remote users can have access to the Public folder.

In contrast, when you browse into Windows Vista and XP computers, the Public user profile is shared separately, under the name Public or Shared Documents. Shared user profiles are shared individually as separate shares.


Image Tip

If you’re using Windows 10 Pro or Enterprise edition, you can make someone else’s shared folder’s contents available to you even when your computer is disconnected from the network. For instructions, see the “Offline Files” section in Chapter 37, “Networking on the Road.”


Viewing a Computer or Shared Folder Directly Using Its UNC Path

If you know the Universal Naming Convention (UNC) pathname of a shared folder on a specific computer, you can instantly view its files by typing the UNC path into the Address box at the top of any File Explorer window. You can type a path that includes just a computer name, a computer name followed by a folder’s share name, or a longer path that specifies subfolders or a file within the shared folder.

For example, suppose you want to see the folders shared by a computer named “laptop.” Open a File Explorer window from the taskbar or by right-clicking the Start button and selecting File Explorer. Click in the Address box, and the “breadcrumb” path will disappear. Then type \laptop and press Enter. This displays all of laptop’s shared folders, without your having to browse your way there. Likewise, you can see the files shared by a user whose account is named “lucy” on that computer using \laptopuserslucy.

We talk more about UNC pathnames later in the chapter, in the section “Understanding the Universal Naming Convention.”

Searching the Network

If you’d like to find a particular file but don’t know where it is, browsing through the network isn’t a particularly easy way to find it. However, you can quickly locate shared folders and files by name and by content using the Search box in the upper right of any File Explorer window.

To begin a search, open any File Explorer window (say, from the taskbar or by right-clicking the Start button and selecting File Explorer). Then follow the instructions in the following sections to find files, computers, or printers.

Searching for Files or Folders

You can search a particular network computer for files and folders, by name and by content, using these steps:

1. Open a File Explorer window and select Network in the left pane.

2. Expand the Network list and click the name of a computer.

Alternatively, you can just type the computer’s UNC name into File Explorer’s Address window, for example, \laptop.

3. Type all or part of the desired filename, or a word or phrase to be found in the file, in the Search box.

This search will locate files and folders within the contents of all shared folders on that computer, but only those that you have permission to view. Searching across the network can take quite awhile. If you have an idea where the desired file might be, you can speed things up considerably if you dig down into one or more levels of folders inside the network computer’s icon before you start the search.

Image To learn more about searching for files, seeSearching Your PC,” p. 169.

To search all the shared folders and libraries in a homegroup, the steps are similar:

1. Open a File Explorer window and select Homegroup in the left pane.

2. Type all or part of the desired filename, or a word or phrase to be found in the file, in the Search box in the upper right.

This procedure searches all of the libraries you and others have shared, on all computers that are turned on and connected to the network.

On an Active Directory network, the domain administrator can choose to list, or publish, some shared folders in the directory; these folders might contain important resources that the company wants to make widely accessible and easy to find. See “Searching Active Directory,” later in the chapter, for more information. If you are trying to find a particular shared folder but it has not been explicitly published in the directory, you’re out of luck; there’s no other way to find it besides browsing through the network’s computers or searching specific computers as described earlier in this section.

Searching for Computers

To search for a computer by name, select the word Network in the File Explorer window’s left pane and type all or part of a computer name in the Search box. Windows will display an icon for each matching computer.

You can explore any of the listed computers to view its shared folders or printers; if you delve into the shared folders, you can open or copy the available files as you find them.

Searching for Printers

Searching for printers is possible only on an Active Directory network. In a large corporation’s network, hundreds or thousands of network printers might be scattered over a large area. Find Printers lets an AD network user find just the right type of printer using a powerful query form. This feature is handy if you’re a business traveler using the network in an unfamiliar office, or if you’re in such a large office setting that you aren’t familiar with all the printing resources on your network.


Image Tip

On an Active Directory network, view the entire directory the first time you use Find Printers. This will give you an idea of how location and printer names are organized in your company. If too many names are listed, you can click Clear All to clear the search listing and then restrict your search using a location name that makes sense for your network. For example, if your company has put floor and room numbers such as “10-123” in the Location column, you could restrict your search to printers on the tenth floor by searching for “10-” in Location.


To search AD for a printer, open File Explorer and select Network in the left pane. In the ribbon, click Search Active Directory and select Printers from the Find drop-down list. You can leave the scope set to Entire Directory, or you can select a subdomain next to the word In.

You can search for printers in three ways: by name and location, by printer capabilities, or by more advanced attributes. To find all the printers in the directory, leave the form blank, as shown in Figure 21.3, and click Find Now. To search for printers with capabilities such as double-sized printing or color, select the Features tab, select the desired features, and then click Find Now.

Image

Figure 21.3 You can search Active Directory for a printer based on location or capabilities (features) that you require.

Searching Active Directory

On an enterprise domain-type network, Active Directory contains information on many more objects than just users, computers, and printers. It includes shared folders, organizational units, policy settings, certificate templates, containers (business groupings), foreign security principals, remote storage services, RPC services (used for advanced client/server software applications), and trusted domains. It can also contain information for other objects defined by your own organization. Most of this information is used only by domain administrators to configure Windows networks over vast distances; however, you can search for anything and can specify your qualifications based on more than 100 different criteria.

To make an AD search, select Network in the left pane of File Explorer and select Search Active Directory. The AD search tool appears, as shown in Figure 21.4. To start, select one of several search categories in the Find drop-down list. You can use a quick form-based search for any of the most useful objects.

Image

Figure 21.4 Using the Active Directory search tool, you can use a simplified form for any of several categories of directory objects, or you can use the Advanced tab to construct queries using any of the available fields.

You can also use the Advanced tab to build specific queries such as “Last Name Starts with Kni,” as shown in Figure 21.4. This is the full-blown search system, and here you have 53 fields to choose from when searching for users—everything from A to Z (Assistant to ZIP Code) if you need it.


Image Note

For a brief introduction to LDAP queries, you might visit https://technet.microsoft.com and search for “LDAP Query Basics.”


If you choose Find: Custom Search, you can choose from the whole gamut of fields in the entire catalog of AD objects, and in the Advanced tab, you can enter Lightweight Directory Access Protocol (LDAP) queries directly for submission to the AD service. This is the native query syntax for Active Directory, and it’s available here mostly for system debugging.


Image Note

In the following discussion, we refer to “files,” but the issues are the same for both the files and folders inside any shared folder.


Security and File Sharing

Windows 10, 8.1, 8, and 7 computers let network users see only the files and folders that they actually have permission to use, based in most cases on their username and password. It’s worth explaining just how that permission is determined. The topic is not that difficult, but it’s complicated by the fact that permissions are calculated by Windows networking in several different ways, depending on settings and the versions of Windows you encounter.

Two levels of security are involved when Windows grants a user access to a file over a network: permission settings on the file itself, which would apply if the user logged on at the computer directly, and network permissions, which act as additional restrictions when a file is accessed over the network but don’t grant any additional permissions that a user wouldn’t have if she tried to access the file while logged in directly to the computer. We explain why this is done shortly. Let’s look at file permissions first.

File Permissions and Networking

File permissions determine who can read, modify, write to, or delete a file or folder based on their user account. Files and folders stored on a disk formatted with the NTFS file system (which is always used on the disk that contains Windows 7, 8, or 10) can have these permission settings applied on a user-by-user basis as well as by membership in groups such as Administrators and even Everyone. When you log on to a computer, these settings determine which files you can look at and which you can change.

Image For more information about file permissions, seeSetting Security Permissions on Files and Folders,” p. 754.

When you access a file over a network, this permission system still applies. What can get confusing is, how does the remote computer determine who you are? The answer to that question depends on the versions of Windows you and it are running, and on several settings. Here are some scenarios you might encounter. Go down through the list to find the first scenario that describes your situation, and stop there. In the following discussion, “the remote computer” refers to a computer on the network that has a file you want to use, and “you” and “your computer” are trying to get to that file.

Image If your computer and the remote computer are members of a domain network, and you’re logged on using your domain account, your user account is recognized by all computers on the network. You’ll get access to the file if its permission settings grant access to your account, or to any groups to which you belong.

Image If your computer and the remote computer are members of a homegroup, and if you left enabled the Advanced Sharing setting Allow Windows to Manage Homegroup Connections, as it is by default, your computer will connect to all other homegroup computers using the built-in user account HomeGroupUser$, which is a member of group HomeUsers. Whenever users share a library, folder, or file with their homegroup, Windows sets permissions on that library, folder, or file so that the HomeUsers group has Read or Read and Write access. In this way, all users in the homegroup get the same access rights to the shared resources. So, you’ll get access if the remote folder was shared with the homegroup.

Image If the remote computer runs Windows 10, 8.1, 8, 7, or Vista with Password Protected Sharing turned on, or XP Professional with Simple File Sharing disabled, or Windows Server in a domain that your computer is not a member of, the remote computer will check to see whether it has an account set up with the same name and password as the account you are using on your computer. If so, it will grant you access to files based on rights set for that account name. If the account name or password doesn’t match, your computer will prompt you to enter an account name or password that is valid on the remote computer.

Image If both your computer and the remote computer run Windows 10, 8.1, 8, or 7, and the remote computer has Password Protected Sharing turned off, a rule unique to these versions of Windows applies:

If the remote computer has an account with the same name as your account, and that account has a password set and your password is the same on both computers, you will be given access to a file based on privileges set for your account on the remote machine.

Image If none of the preceding scenarios apply, the remote computer attempts to access the file using the Guest account. You’ll be able to use only files that are readable and/or writable by Everyone or Guest.

Phew! We know this looks like a big mess, but it actually boils down to just two alternatives: A remote computer either will use a specific account to access files, in which case you can get to the files that this account can see; or it will use the Guest account, in which case you only can get to files that are marked as usable by Everyone or Guest.

Another point to remember is that files stored on removable media typically don’t use the NTFS format and don’t have any per-user permission settings. Flash media formatted with the FAT or ExFAT file systems are readable and writable by everyone, and CD/DVD-ROMs are readable by everyone who connects to the computer. Network permissions, described next, do apply.

Network Permissions

The preceding permission scheme applies equally to files accessed over the network and files accessed directly by logging in to a computer. When you share a folder or drive with the network, though, you can assign privileges, again based on user and group names, that act like a filter for the file permissions we just discussed. A network user gets only the privileges that are listed in both file permissions and network permissions. Figure 21.5 shows how this works.

Image

Figure 21.5 You only get access rights that are given to you both through file permissions and through network permissions.

Another way to look at this is that a network user loses any permissions that are omitted from the network permission list. This scheme can be used in complex ways, but mostly only two situations are used:

Image If you share a folder and set its network privilege list to give Read access but not Write access to Everyone, then users get Read access if their user account gives them permission, but nobody gets to modify its files over the network.

Image If you set the network permissions so that Everyone has both Read and Write permissions, users get exactly what they’d get if they tried to use the file while logged on directly—no more, no less. Access will still be governed by the permissions set for each file and folder.

These are the two ways Windows sets up network permissions when you share folders using the techniques we describe later in the chapter.

Using Printers on the Network

Whether you’re part of a large corporation or a small workgroup, or even if you’re a home user with just two computers, network printing is a great time and money saver. Why connect a printer to each computer when it will spend most of its time idle? By not having to buy a printer for each user, you can spend the money you save more constructively on faster, higher-quality, and more interesting printers. For instance, you might add a color photo-quality printer to give your network users more output choices.

Later in the chapter, we describe how to share a printer attached to your computer; right now, let’s look at using a printer that has already been shared elsewhere on the network.

Windows can directly attach to printers shared by any computer that supports Microsoft Networking services, which includes any version of Windows released since 1993, OS/2, Mac OS X, as well as Unix and Unix-like operating systems running the Samba service. Windows can also connect to networked printers that use the LPR protocol or other TCP/IP protocols.

Using a Shared Printer

To use a shared printer, you must set up an icon for the printer in your Devices and Printers window. The easiest way to do this is to browse or search your network for shared printers by following these steps:

1. Open File Explorer from the taskbar, or right-click the Start button and select File Explorer.

2. In the left pane, click Network. Locate the computer that is sharing the printer you want to use. (On a large network, you can use the Search box to help find it.) Double-click the computer icon.

3. Double-click the icon for the printer you want to use.

4. Windows will try to get the printer’s driver software from the computer that is sharing the printer. Click Install Driver if you trust the owner of the other computer. You will also need to approve a User Account Control prompt. Windows may automatically locate and install a driver if the driver software is “signed” (that is, certified as having come directly from the stated manufacturer without any modification). However, if you can’t trust the other computer, click Cancel. Then use the procedure that immediately follows this one so that you can select your own driver software.

5. When the process finishes, view the new printer in the Devices and Printers window, using either of these methods:

Image Right-click the Start button and select Control Panel. Then, under Hardware and Sound, select View Devices and Printers.

Image In the taskbar’s search box, type printers and then select Devices and Printers.

If you want to verify that the printer will actually work correctly for you, right-click the printer icon and select Printer Properties. Click Print Test Page to ensure that the network printer is working correctly.


Image Note

Don’t make any changes to the printer’s Printer Properties settings without the permission of the printer’s owner.


If you will use this printer most or all of the time, right-click the printer’s icon and select Set As Default Printer.

That’s all there is to it. You can now use this printer just like any other Windows printer, so the printer-management discussion in Chapter 7, “Devices and Printers,” applies to network printers too. The only difference is that the remote computer’s administrator might not have given you management privileges for the printer, so you might not be able to change the printer’s properties or delete print jobs created by other users.

An alternative way to add a printer is with the Add Printer Wizard, using these steps:

1. Open Devices and Printers as described in step 5 of the previous procedure, and at the top, select Add a Printer.

2. Windows displays a list of networked printers that it knows about, such as ones that it finds shared within the same workgroup. If the printer you want to use is listed, select it, click Next, and then proceed with step 4.

3. If the printer to which you want to connect isn’t listed, click (drumroll, please) The Printer That I Want Isn’t Listed.

You’re then presented with another dialog box, where you can type the location and name of the printer to which you want to connect. If you know its network name already, click Select a Shared Printer by Name and enter the share name into the Name box in UNC format—for example, \kevinsLaserJet. Click Next to finish installing the printer. If you don’t know the name, click Browse, and you’ll be able to dig into your network to find the printer.

4. After you’ve identified and selected the shared printer, click Next. If a suitable printer driver is not found automatically, Windows will prompt for one. Select the printer’s manufacturer and model number from the displayed lists. If the printer model isn’t listed, click Windows Update to see whether the driver can be downloaded. Otherwise, follow the steps under “What to Do If Your Printer Isn’t Listed” in Chapter 7.

5. Follow any additional instructions to finish setting up the printer.

Again, as noted previously, you can now use this printer like any other Windows printer, and if you plan to use it most or all of the time, you might want to make it your default printer.

Using Printers over the Internet with IPP

The Internet Printing Protocol (IPP) sends output to printers over the Internet. Some companies and service bureaus provide this sort of service. If you need to connect to an IPP-based printer, follow these steps:

1. Right-click the Start button and select Control Panel. Select Programs, Turn Windows Features On or Off. Click the + sign next to Print and Document Services. Check Internet Printing Client (if it’s not already checked) and then click OK. You must perform this step only once.

2. In the still-open Control Panel window, click the Back button and then select View Devices and Printers, Add a Printer. Immediately click The Printer That I Want Isn’t Listed.

3. Click Select a Shared Printer by Name, enter the URL supplied by the print service provider, and then click Next.

4. You might be prompted to select the printer manufacturer and model number. The print service provider will tell you which model to select.

5. You might also be prompted to enter a username and password, which will also be supplied by the service provider. By default, Windows will use your current logon name, domain, and password.


Image Tip

If you use a printing service while traveling, remember to delete the printer from your Printers folder when you leave town; you don’t want to accidentally send a report to Kathmandu after you’ve returned to Kalamazoo.


When the new printer icon is installed, you have a fully functional Windows printer. You can view the pending jobs and set your print and page preferences as usual, as long as you’re connected to the Internet (or the LAN, in a service establishment).

Using Unix and LPR Printers

In the Unix world, most shared printers use a protocol called LPR/LPD.

Image For more information about Unix printing, seeInternetworking with Unix and Linux,” p. 437.

The LPR protocol is also used outside Unix. Manufacturers such as Hewlett-Packard make direct network-connected printers that accept the LPR protocol, and many companies sell small LPR-based print server devices that can attach to your printer as well. You can connect one of these printers to your LAN, configure its TCP/IP settings to match your LAN, and immediately print without running a cable from a computer to the printer. This way, you can place a printer in a more convenient place than can be reached by a 10-foot printer cable. Better yet, you can use these networked printers without requiring that a Windows computer be left turned on to manage it.

To have Windows send output to an LPR print queue or device, follow these steps:

1. Right-click the Start button and select Control Panel. Select Programs, Turn Windows Features On or Off. Click the + sign next to Print and Document Services. Check Internet Printing Client (if it’s not already checked) and then click OK. You must perform this step only once.

2. In the still-open Control Panel window, click the Back button and then select View Devices and Printers, Add a Printer. Immediately click The Printer That I Want Isn’t Listed.

3. Select Add a Printer Using a TCP/IP Address or Hostname and click Next.

4. Enter the IP address or hostname of the Unix or print server, and the name of the print queue on that server.


Image Note

If you enter the wrong IP address, hostname, or print queue name, right-click the printer’s icon and select Printer Properties. Select the Ports tab, highlight the LPR port, and click Delete Port. Click Add Port and then enter the correct information. When the new port has been added, check the box next to its name. Click OK.


5. If Windows fails to determine what type of printer you are connecting to, click Cancel and then repeat the process. This time, set Device Type to TCP/IP Device and uncheck Query the Printer and Automatically Select the Device to Use. After you click Next, manually select the manufacturer and printer model. (If the appropriate driver is not listed, you might be able to get it by clicking Windows Update.) Then click Next to proceed with the printer installation.

Because an LPR printer is considered a local printer, you can share it with others on your network. Your computer will talk directly to the printer, while other computers will connect through yours. Alternatively, they can each connect to it directly, as you did.

Using Other Network-Connected Printers

Windows 10 can use other types of network-connected printers as well. Some printer models come with a built-in network connection (either wired or wireless), and others have a network adapter option. You can also buy network printer servers, which are small boxes with a network connector and one to three printer-connection ports. These devices let you locate printers in a convenient area, which doesn’t need to be near a computer.

The installation procedures for various printer and server models vary. Your networked printer or print server has specific installation instructions. You have a choice about how the printer will be shared on your network:

Image You can install the network-to-printer connection software on one of your Windows computers and then use standard Windows printer sharing to make the printer available to the other computers on your network.

Image You can install the printer’s connection software on each of your computers.

With the first method, you guarantee that print jobs will be run “first come, first served” because one computer will provide a single queue for the printer. Another plus is that you have to do the software setup only once; it’s much easier to set up the additional workstations to use the standard Windows shared printer. The one computer must be left on for others to use the printer, however.

With the second method, each computer contacts the printer independently. If more than one user attempts to print at the same time, the “winner” will be chosen by the printer at random while the other users wait. However, no computers need to be left on because each workstation contacts the printer directly.

You can use either method. The first one is simplest and is best suited for a busy office. The second method is probably more convenient for home networks and small offices.

Network Power User Topics

The following sections present some Windows networking techniques that can help you get the most out of your network. You can scan through these sections for any tips that might be helpful in your home or office.

Backing Up Your Computer over the Network

You can back up the contents of your hard disk, or the attached external drives on your computer, to another computer’s hard disk over the network. On all Windows 10 versions, you can back up to a shared network folder using the built-in File History and System Image backup mechanisms discussed in Chapter 32, “Protecting Your Data from Loss and Theft.”

You can also back up files over the network using command-line tools. We give an example of this at the end of this chapter in the “Managing Network Resources Using the Command Line” section.

Finally, most third-party backup programs let you back up to a network location.

Sharing and Using an Entire Drive

Shared folders don’t have to be subfolders. Computer owners can share the root folder of a disk drive, making the entire drive available over the network. This capability is especially useful with DVD, CD, and USB disk drives. For example, if an entire DVD-ROM drive is shared, you can access the data disc in it from any computer on the network.

Just so you know, Windows automatically shares your entire hard drive with the special name C$. (Any other hard drives would also be shared as D$, E$, and so on.) These shares don’t show up when you browse the network; the dollar sign at the end tells Windows to keep the name hidden. Oddly enough, they don’t appear if you view the drive’s Sharing properties either. You can see them only if you type net share at the Command Prompt. And, you can’t use these shares on a home/small office workgroup network; they can be accessed only by network administrators on a domain network.


Image Tip

You can use the technique of sharing an entire drive to install software on a computer that has no working CD/DVD drive but does have a working network connection. Just put the disc into a computer that does have a working drive and share that drive.


However, you can get around this by sharing the root (top-level) folder of one of your drives using a share name of your own choosing. For example, you could right-click your DVD drive in the File Explorer window and then share the drive using the name dvd, using the instructions for sharing a folder found later in the chapter. Then, on another computer, you can map a drive letter to the shared disc, using the instructions under “Mapping Drive Letters,” also found later in this chapter.

Understanding the Universal Naming Convention

You can specify folders and files on your own hard disk using a full pathname and filename in the MS-DOS filename syntax that looks like this:

c:foldersubfolderfilename

Similarly, you can specify printers, folders, and files on a network using a syntax called the Universal Naming Convention (UNC), which looks like this:

\computernamesharenamesubfolderfilename

Notice that a UNC name uses backslashes, not forward slashes like an Internet URL. Anywhere a Windows application lets you enter a pathname or filename, you can also enter a UNC name.

A UNC share name is a sort of “shortcut” to a real folder on the remote computer’s hard disk. It can be anywhere in the folder structure on the disk; it doesn’t have to be a top-level folder. When users on the network access a shared folder, they can’t see “up” into the higher-level folders.

For example, I might have a folder on my hard disk named C:usersriandocumentsplans. If I want to give officemates the use of these business documents, I might share that folder with the share name plans. My computer is named ambon, so the UNC name for this folder will be \ambonplans.

If a spreadsheet file named to do list.xls exists in this folder, on my computer its full path and filename would be C:usersriandocumentsplans o do list.xls. A user on another computer can refer to this same file by its UNC name, \ambonplans o do list.xls.

If the computer whose files you want to use is on a LAN using Active Directory or is part of a distant company network, the computer name part of a UNC name can be specified as in the following:

\ambon.mycompany.comdocs o do list.xls

If you know only a remote computer’s IP network address, you can use it as the computer name, as in this example:

\192.168.0.10docs o do list.xls

Shared printers are also given share names and are specified by their UNC path. For example, if I share my HP LaserJet 4V printer, I might give it the share name HPLaser, and it will be known on the network as \ambonHPLaser. Here, it’s not a folder but rather a printer. You can’t tell this from the name, but Windows keeps track of the type of resource.


Image Note

Elsewhere in this chapter, we use UNC names such as \serverfolder as a sort of generic name. By server, we mean the name of the computer that’s sharing the folder. It doesn’t have to be a Windows Server; it can be any computer on your network. You must use your network’s actual computer names and shared folder names.


Mapping Drive Letters

If you frequently use the same shared network folder, you can make it a “permanent houseguest” of your computer by mapping the network folder to an unused drive letter on your computer—one of the letters after your hard drive’s usual C: and the DVD-ROM drive’s usual D:. Mapping gives you several benefits:

Image The mapped drive appears along with your computer’s other real, physical drives in the This PC view, enabling you to quickly browse, open, and save files.

Image Access to the shared folder is faster because Windows maintains an open connection to the sharing computer.

Image MS-DOS applications (some people do still use them!) can use the shared folder through the assigned letter. Most legacy DOS applications can’t accept UNC-formatted names such as \serversharedsubfolderfile, but they can use a path such as k:subfolderfile.

Image Best of all: You can map a shared folder using an alternative username and password to gain access rights that you might not have with your current Windows login name.

To map a drive, follow these steps:

1. Click the File Explorer icon in the taskbar to open File Explorer. Select This PC in the Navigation pane, at the left. In the File ribbon, select Map Network Drive to open the Map Network Drive dialog box.

Alternatively, in File Explorer’s left pane under Network, select the name of the computer that is sharing the folder you want to use. In the right pane, select the icon of the folder you want to use. Then, in the Home tab of the ribbon, select Easy Access, Map As Drive. (If the File Explorer window isn’t wide enough, Easy Access can be hard to find. It’s in the New section.)

2. Select an unused drive letter from the drop-down list, as shown in Figure 21.6. You can pick a drive letter that has some association for you with the resource you’ll be using: E for Editorial, S for Sales—whatever makes sense to you. I usually start with Z: and work backward from there if I map more than one drive.

Image

Figure 21.6 You can select any unused drive letter to use for the drive mapping.

3. If you didn’t start by using the Easy Access menu, you must select the name of the shared folder you want to assign to the drive letter. You can type the UNC-formatted name, if you know it already—for example, \servernamesharename.

Alternatively, you can click Browse to poke through your network’s resources and select the shared folder, as described earlier in this chapter. Find and select the desired shared folder, and then click OK.

4. There are two additional optional steps:

Image If you want this mapping to reappear every time you log on, check Reconnect at Logon. If you don’t check this box, the mapping will disappear when you log off.

Image If your current Windows username and password don’t give you permission to use the shared resource, or if your username isn’t recognized at the other computer, select Connect Using a Different Username. (This works only if usernames are actually used on the networked computer. If it always grants access via the Guest account, as discussed under “File Permissions and Networking,” earlier in this chapter, it doesn’t matter what account information you supply.)


Image Note

You must use the same username for all connections to a given computer. If you have other drive letters already mapped to the other computer with your original username, you must unmap those drives before you can make a drive mapping with a different username.


5. Click Finish.

6. If you selected Connect Using a Different Username, Windows prompts you for a username and password. Enter them, and then click OK.

After you map a drive letter, the drive appears in File Explorer under This PC, along with your local disk drives. You might notice a couple of funny things with these drives:

Image If you haven’t accessed the network drive for 20 minutes or so, it might turn gray, indicating that the network connection to the remote computer has been disconnected. When you use the drive again, Windows will reconnect and the drive entry will turn black.


Image Tip

If you’re using Windows 10 Professional or Enterprise edition, you can make the drive’s contents available even when you’re disconnected from the network. For instructions, see the “Offline Files” section in Chapter 37, “Networking on the Road.”


Image If the remote computer (or you) really goes offline, a red X appears through the drive.

Mapping a Drive to a Subfolder

When you’re setting up a drive mapping, as described in the previous section, and you use the Browse button to select a shared folder, you might notice that Windows lets you delve into the shared folders themselves. If you drill down into a subfolder and select it as the location to use in mapping a drive letter, you’ll find that the mapped drive starts at the subfolder. That is, the subfolder becomes the mapped drive’s “root directory,” and you can’t explore upward into the shared folder that contains it. You can map a drive letter to a subfolder using the GUI method described in the preceding section, or using the net use command-line utility described later.

This feature is most useful for administrators in setting up scripts to map drives based on a user’s login name. For example, mail might be stored in subfolders of \servermail according to username. Mapping drive M: to the folder \servermail\%username% lets each user get at his mail (directly) via the same folder M:, and discourages users from poking around in other people’s mail folders.

Sharing Resources

In the following sections, we show you how to share folders and printers with other users on your network.

You can elect to share your files with others in several different ways:

Image If your computer is part of a homegroup, you can share your libraries with the homegroup. Users on the member computers will be able to see anything you save in a shared library.

Image You can move files to a folder under UsersPublic, which is called the Public user profile. Here, anyone can access them automatically, without your having to do anything else but enable sharing on the Public folder, as described shortly.

Image You can elect to share any files or folders that reside anywhere within your own profile folder, which is found under Users on the hard disk. Other network users will be able to find those files by browsing into your computer’s Users share name.

Image You can create new, separate folders on your hard disk and share them under their own share names.

In the past, it was common to create separate folders and share them independently. To some extent, this makes it easier for other users to locate shared folders, because each folder has its own name. On Windows 10, 8.1, 8, and 7, however, Microsoft suggests “sharing in place,” using any of the first three methods. These folders are easier to set up, but it’s perhaps a bit harder on people who want to find those shared materials because they must dig into the Users folder. Any of the methods are acceptable, though; it really just depends on how you prefer to organize your files.


Image Note

On a large enterprise LAN, most important network resources, shared folders, and printers are set up and tightly controlled by network managers. You might not be able to share resources from your own computer, although in many companies you can, and it’s useful to know how to do this so that you can easily give coworkers access to files that you use in common.

On a home or office workgroup network, any Administrator-level user can set up and manage file and printer sharing.


The following sections describe how to share folders these various ways.

Sharing with a Homegroup

If your computer is a member of a homegroup, you can share the entire contents of any of your folders so that the other members of the homegroup can see and use files in them. Use the following procedure:

1. At the right end of the taskbar, right-click the network icon, select Open Network and Sharing Center, and then select HomeGroup; or right-click the Start button, select Control Panel, and then select Choose Homegroup and Sharing Options.

2. Select Change What You’re Sharing with the Homegroup.

3. Set the drop-down list box next to each folder name to Shared or Not Shared, as shown in Figure 21.7. When you’re finished, click Next and then Finish.

Image

Figure 21.7 You can change your mind about sharing or not sharing your content and printers with the homegroup at any time.

When you change a library’s setting from Not Shared to Shared, the libraries will be shared read-only. All other homegroup members can see, view, play, and print any of the files in your shared libraries, but by default, they can’t add to, change, delete, or rename them. You can change that, if you want, by using the following instructions.

Setting Permissions for Homegroup Sharing

If you want to let other users add to or change the files in any of your libraries, or if you want to enable or prevent access to a specific library, folder, or individual file, use this procedure:

1. Locate the library, folder, or file in File Explorer. In most cases, you’ll want to select the Documents, Music, or other folders under This PC, but you can also share any other folder on your computer. Right-click the folder’s or file’s icon, and select Share With.

2. Select one of these choices:

Image Stop Sharing—Keeps everyone else out of the library, file, or folder.

Image Homegroup (view)—Lets everyone else in the homegroup read but not add to, change, rename, or delete the file(s).

Image Homegroup (view and edit)—Lets all other homegroup users not only view but also make changes to the selected library, folder, or file. This includes adding new files, deleting files, and so on.

Image Select a listed user account name to share the folder or library with the named user. They will be given “view” (read) permission.

Image Specific people—Enables you to choose access levels for individual users. This might not work quite as you might guess, as we explain next.

The first time you share a new folder, use one of the two Share With Homegroup options. This makes the folder appear in the Homegroup listing on everyone else’s computer. Then, if you want to customize access for specific people, right-click again and select Share With, Specific People to make adjustments.

Editing Permissions for Specific People

The last choice, Specific People, lets you set permissions for yourself, for the homegroup, for Everyone, and for individual user accounts using the permissions list shown in the File Sharing dialog box (see Figure 21.8).

Image

Figure 21.8 You can control the type of access to a shared library, folder, or file that is granted to your homegroup and in some cases to specific user accounts.

Any entries you add for individual users won’t apply when other users in your homegroup try to use the shared resource, because member computers always use a common built-in account. Only the permissions for the Homegroup entry matter. Entries for individual user names affect access only from computers that aren’t members of the homegroup and from computers not running Windows 10, 8.1, 8, or 7. And whether a specific account or the Guest account will be used depends on that complex list of situations we provided under “File Permissions and Networking,” earlier in this chapter.

If you have computers on your network that run older versions of Windows, and therefore can’t be members of the homegroup, you can give their users easy access to your shared files in either of two ways:

Image If you turn off Password Protected Sharing on your computer, add the group name Everyone to the permission list. The other computers will get access to the files this way.

Image If you want to leave Password Protected Sharing turned on for your computer, create accounts for each of the other computers’ users on your computer, using their account names and passwords. Or you can create a single user account named, for example, “sharing” on your computer, assign a password to it, and have all of the other users use this account when they connect over the network. Add this account to the permissions list and then grant it Read or Read/Write access.

To change the permissions granted to a user or group listed in the File Sharing dialog box shown in Figure 21.8, change the entry in the Permission Level column to Read, Read/Write, or Remove, which removes the entry from the list. To add a new entry, select a name from the drop-down list next to the Add button and click the Add button. You can then change the new entry’s Permission Level.

Your account is listed as the file’s or folder’s owner, and you can’t change this entry.


Image Note

If you add Everyone to the list, the permissions you give to it will set the minimum access level granted to, well, everyone. Specifically, if you grant Everyone Read/Write access, this trumps any other settings in the list. Anyone will be able to change the files.


Sharing the Public Profile Folder

There is a very simple way to share files and folders with other users if your network includes computers running older versions of Windows that can’t participate in a homegroup. The trick is to use the folder named UsersPublic on the drive that contains Windows. If you enable Public Folder Sharing, this folder will be readable and writable by everyone on the network.

To enable sharing the Public folder, follow these steps:

1. At the right end of the taskbar, right-click the network icon and select Open Network and Sharing Center; or right-click the Start button, select Control Panel, and then select View Network Status and Tasks.

2. Click Change Advanced Sharing Options.

3. Scroll down and click the button that opens the All Networks section. Under Public Folder Sharing, select Turn On Sharing. Then click Save Changes.


Image Tip

In most previous versions of Windows, the Public folder was listed in the [My] Computer display as “Shared Documents.” On Windows 8 and 10, you can get to its subfolders by using File Explorer to browse into c:usersPublic under This PC. If you’ve enabled the display of Library folders, you can also browse into the Public folders inside your various libraries.


Following these steps makes the folder available to anyone who can connect to your computer over the network. Next, you must make it possible for people to connect. You can do this in either of two ways:

Image Leave Password Protected Sharing turned on. Each of the other users on the network will need an account on your computer. You can create individual accounts, or you can create a single account, set a password on it, and have all the other users use that same name and password when they go to use your computer’s shared folder UsersPublic. (The folder’s full UNC name is \computernameUsersPublic, with the actual name of your computer substituted in place of computername.)

Image In the Change Advanced Sharing Options screen, turn off Password Protected Sharing. Now, anyone who can connect to your network will be able to read and write files in your computer’s shared folder UsersPublic.

If you use this second option, be careful to let only trustworthy people connect to your network. If you have a wireless network, you must have WPA2 security enabled on it.

Once the Public folder has been shared, you must move or copy files or folders that you want to share into the Public folder structure.

Sharing Your Own Folders in Place

To share a folder that’s inside your user profile (for example, a folder inside your Documents folder), just right-click the folder or file in any File Explorer and select Share With.


Image Tip

If you move files from your own private folders into the Public folders using File Explorer, it will automatically update the files’ permissions settings as it moves or copies them so that network users can work with them. If you use Command Prompt tools to move files, permissions are not modified, and the file likely will not be readable or writable by network users. You might need to manually add the group Everyone to the files’ or folders’ permissions list.


The entire Users directory structure is shared by default on Windows 10, so all that’s necessary is to let Windows change your file’s or folder’s permissions so that network users can see it. This is called “sharing in place.” Just follow the steps:

1. Locate your file or folder in File Explorer. Right-click it and select Share With.

2. If your computer is a member of a homegroup, select one of the two Homegroup options, as outlined previously under “Setting Permissions for Homegroup Sharing.” This makes the folder appear in everyone else’s Homegroup listing. If you want to customize access to the folder, right-click it again, select Share With, Specific People, and proceed as described under “Editing Permissions for Specific People.”

Otherwise, if the Homegroup options don’t appear, select Specific People and then proceed as described under “Editing Permissions for Specific People.”

If you later want to stop sharing this file or folder, right-click and select Share With, Nobody.

Sharing Folders Independently

To share a folder that isn’t inside your user profile folder, follow these steps:

1. Locate the folder in File Explorer, or to share an entire drive, select the name of the DVD-ROM, USB, or hard drive from the list in the This PC section.

2. Right-click the folder’s or drive’s icon and choose Share With.

3. If your computer is a member of a homegroup, proceed as outlined previously under “Setting Permissions for Homegroup Sharing.” Be sure to select one of the two Homegroup options first, even if you intend to customize access for specific users or change the share name later.

4. If your computer is not a member of a homegroup, or if you want to grant access to non-homegroup computers, select Specific People and proceed as described previously under “Editing Permissions for Specific People.”

5. Say you want to customize the share name or select specific users with which to share the folder. After you’ve finished sharing using the preceding steps, right-click the folder’s or drive’s icon again, select Properties, and select the Sharing tab. Click Advanced Sharing and correct the share name as desired. You can also enter a comment that will appear when people browse to this folder over the network.


Image Tip

You can prevent other users from seeing your shared folder when they browse the network by adding a dollar sign to the end of the share name, as in mystuff$. They must know to type this name to use the shared folder. This technique alone does not prevent any users from seeing your files if they know the share name.


You can use the Permissions button to limit the access users have to the shared files when they’re using them over the network. A file’s Security settings control each user’s access to the file, even if the Sharing Permissions settings give everyone Read/Write permission. Sharing Permissions just let you further restrict access by unchecking boxes in the Allow column.

6. Click OK to close the dialog box.

If you later want to stop sharing the folder or drive, follow these steps:

1. Locate the folder or drive in File Explorer. Right-click it and select Properties.

2. Select the Sharing tab, and then click Advanced Sharing.

3. Uncheck Share This Folder, and then click OK.


Image Note

If you are canceling sharing of an entire drive, you might notice that the administrative share C$, D$, or other is not listed. You can safely uncheck Share This Folder, and the administrative share will not be canceled.


Alternatively, you can locate the folder, right-click it, and select Share With, Nobody. However, this method not only removes the share but also can change file permissions.

Sharing Printers

You can share any of your “local” printers so that other people on the network can use them. A local printer is any printer that is directly cabled to your computer, or to which you connected via the network using LPR or other direct network protocols.

To be sure that printer sharing is enabled, do the following (you should need to do this only once):

1. Right-click the network icon in the taskbar and select Open Network and Sharing Center. Alternatively, open the Control Panel and select View Network Status and Tasks.

2. Look to see what type of network you’re attached to. If your network is labeled Public Network, and you really are connected to a public network (for example, in a cafe, hotel, or school), you should not enable file and printer sharing; this would expose your computer to hackers. If the label says Public Network but you really are on a safe, protected home or office network, change the label to Private as described in “Take Care When you Share” on page 842.

3. At the left side of the Network and Sharing Center, click Change Advanced Sharing Settings.

4. Under File and Printer Sharing, make sure Turn On File and Printer Sharing is selected. If it isn’t, select it and click Save Changes; otherwise, click Cancel. This will take you back to the Network and Sharing Center.

5. If your computer is part of a homegroup, select HomeGroup under See Also. If Printers isn’t listed as being shared, select Change What You’re Sharing With the Homegroup, set Printers & Devices to Shared, and click Next and then Finish.

Now you can share any printer that is directly attached to your computer. To share a printer, follow these steps:

1. Right-click the Start button and select Control panel, or type control panel into the taskbar’s Search box and then select Control Panel from the search results. Then, under Hardware and Sound, select View Devices and Printers.

2. In the Printers section, right-click the printer’s icon and select Printer Properties. This selection is near the middle of the right-click menu; you don’t want the last entry labeled just Properties.

3. Select the Sharing tab.

4. If Share This Printer isn’t already checked, check it. Windows will fill in a share name for the printer. If you like, you can shorten or simplify it.

5. Click OK.

Other people on your network can now use your printer by following the instructions earlier in the section “Using a Shared Printer.”

In most cases, that’s all you need to do. In some cases, you might want to change some of the advanced settings described in the next few sections, but these are optional.

Setting Printer Permissions

If you have a workgroup network and have disabled Password Protected Sharing, or if you have set up a homegroup, you don’t need to worry about setting permissions for printers: Anyone can use your shared printer. If you’re on a domain network or have chosen to use detailed user-level permissions on your workgroup network, you can control access to your shared printers with security attributes that can be assigned to users or groups, as shown in Figure 21.9 and described next.

Image

Figure 21.9 The Security tab lets you assign printer-management permissions for users, groups, and the creator of each print job.

Image

You don’t have to change any of the default permission settings, unless you want to restrict the use of the printer to just specific users on your network. If this is the case, open Devices and Printers, right-click the printer whose settings you want to change, and select Printer Properties. View the Security tab. There, select the group Everyone, and then click Remove. Next, click Add to add specific users or groups, and then give them Print permission. (You could also give someone Manage This Printer or Manage Documents permission, if you want to let that person change the printer’s settings or delete other users’ print jobs.)

Don’t change the CREATOR OWNER entry, however. It should have the Manage Documents permission checked so that each user can delete her own print jobs from the queue.

Changing the Location of the Spool Directory

When jobs are queued up to print, Windows stores the data it has prepared for the printer in a folder on the computer that’s sharing the printer. Data for your own print jobs and for any network users will all end up on your hard drive temporarily. If the drive holding your Windows folder is getting full and you’d rather house this print data on another drive, you can change the location of the spool directory.

To change the location of the Windows print spooler folder, follow these steps:

1. Open the Devices and Printers window.

2. Click any printer. Then, in the upper task menu, click Print Server Properties.

3. Select the Advanced tab and click Change Advanced Settings.

4. Enter a new location for the Spool Folder and click OK.

Printer Pooling

If your network involves heavy-duty printing, you might find that your printers are the bottleneck in getting your work done. One solution is to get faster printers, and another is to add multiple printers. However, if you have two printers shared separately, you’ll have to choose one or the other when you print, and you’ll almost certainly encounter bank-line syndrome: The other line always seems to move faster.

The way around this problem is to use printer pooling. You can set up one printer queue that sends its output to two or more printers. The documents line up single-file, and the printers take jobs from the front of the line, first come, first served.

To set up pooled printers, follow these steps:

1. Buy identical printers—at least, they must be identical from the software point of view.

2. Set up and test one printer, and then configure network sharing for it.

3. Install the extra printer(s) on the same computer as the first. If you use network-connected printers, you must add the necessary additional network ports.

4. View the first printer’s Printer Properties dialog box and select the Ports tab. Mark Enable Printer Pooling and check the ports for the additional printers. Then delete the printer icons for the second and subsequent printers. You should be left with one icon for the pool.

That’s all there is to it; Windows passes print jobs to as many printers as you select on the Ports tab.

Managing Your Network

When you select Network in the left (Navigation) pane of the File Explorer window, the ribbon lists some tasks that can help you manage your network:

Image Network and Sharing Center—Opens the Network and Sharing Center window, from which you can change homegroup settings, manage network adapters, and run automatic network troubleshooting wizards.

Image Add Devices and Printers—Opens a wizard to connect to a locally attached, Bluetooth, wireless, or networked printer.

If you click a computer or server name in the right pane (not the left), additional computer-specific task options appear in the ribbon:

Image Open—Lets you browse the computer’s shared folders and printers.

Image Connect with Remote Desktop Connection—Lets you log on to and use the computer remotely.

Image View Printers—Lets you browse just the computer’s or server’s shared printers.

Windows provides additional tools with which you can monitor the use of the files you’re sharing as well as command-line tools with which you can manage network resources that you use and share.

Monitoring Use of Your Shared Folders

If you’ve shared folders on your LAN, you might want to know who’s using them. For example, you might need to know this information if someone were editing a file in your shared folder. If you tried to edit the same file, you’d be told by your word processor that the file was “in use by another.” But by whom?

The Computer Management tool can help you. Right-click the Start button or press Windows Logo+X, select Computer Management, and open the Shared Folders item in the left pane. The Sessions and Open Files sections can show you who is using your shared folders as well as which files they currently have open. In an emergency, you can right-click an entry and disconnect a user or close an open file. This is a drastic measure and is sure to mess up the remote user, so use it only when absolutely necessary.

Managing Network Resources Using the Command Line

You can perform drive mappings and printer selections with the command line just as easily as from the GUI. If you find yourself repeating certain network and file operations day after day, it makes sense to try to automate these processes by putting commands into batch files.

The net command comes to us virtually unchanged since the original PC network software developed by Microsoft and IBM debuted in 1984. There are so many variations of the net command that I think of them as separate commands: net view, net use, net whatever. Each net command contains a word that selects a subcommand or operation type.

Interestingly, the net command not only can manage and explore your network, but also can start and stop Windows services and create user accounts and groups. You can get online help listing all the net subcommands by typing net /?, and you can get detailed help by typing net command /?, where command is any one of the net subcommands.

The net use command makes and disconnects drive mappings and establishes printer redirection for console (command-line) applications. The basic command is as follows:

net use drive: sharename

The following example maps drive letter Q to the shared folder \abaloneook:

net use q: \abaloneook

You can’t replace the shared folder attached to an already mapped drive, so you should try to delete a previous mapping before trying to make a new one:

net use q: /delete
net use q: \abaloneook


Image Tip

If the drive mapping didn’t exist beforehand, the /delete command will print an error message. That’s fine if you’re typing commands directly in the Command Prompt window. If you perform drive mapping in a batch file, the error message would be disconcerting. You can prevent it from appearing by issuing the command this way:

net use q: /delete >nul 2>nul

NUL is a special filename to Windows; it’s basically a black hole for data. Directing all output to NUL makes sure that the command doesn’t display anything.


Here is an example of a batch file that performs a simple computer-to-computer backup of some important files. Let’s say I want to back up the folder C:ook, and all of its subfolders, from my computer to a shared folder on another computer named abalone. I could put the following commands into a file named backup_book.bat:

@echo off
net use q: /delete 1>nul 2>nul
net use q: \abaloneook
xcopy c:ook q: /d /e /r /c /y
net use q: /delete

The net use commands I just explained. The xcopy command copies my book folder to the remote computer. The options /d /e /r /c /y tell it to copy only newer files, copy even empty folders, copy all levels of subfolders, continue copying even if it runs into a problem, and overwrite older files if they have already been backed up, respectively. Isn’t the command line great?!

On 32-bit copies of Windows, the net use command also maps network printers to the legacy DOS printer devices LPT1, LPT2, and LPT3. The following command lets MS-DOS applications send output to a network printer, by redirecting the LPT1 device:

net use lpt1: \serverprintername

The following command cancels redirection:

net use lpt1: /delete

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.41.52