Windows’ share-level security system allows you to restrict access to shared folders in two ways. First, you can set the access type to Read-Only. Second, you can assign a password to the shared folder. This means that if you want to share a folder that contains sensitive information, you can set the access type to Read-Only, password-protect the folder, and then share the password with only specific users.
However, even if you limit access to a shared folder by password-protecting it, anyone in your workgroup can open Network Neighborhood, see that you’re sharing a password-protected folder, and be curious. As you can imagine, this could be considered a compromise in security.
Fortunately, there’s an old but highly effective Windows networking technique that allows you to hide shared network resources. When you implement this technique, the shared resources won’t appear on the Network Neighborhood or My Network Places, yet those users who know that the resources exist can easily connect to them.
While the technique involves a Windows 9x workgroup, it will also work on Windows NT, Windows 2000, and Windows XP in both workgroup and domain environments.
Hiding a resource you want to share is easy. You simply append a dollar sign ($) to the resource’s share name. When you do, the shared resource won’t appear on the network. Furthermore, any access restrictions or passwords assigned to that shared resource remain in effect.
Hiding a shared folder
Now let’s take a look at how you go about actually hiding a shared folder. For example, let’s suppose that you want to share the My Documents folder as a hidden resource on a system named Neptune-98.
To begin, launch Windows Explorer and select the My Documents folder. Then, right-click the folder and select Sharing from the shortcut menu. When you see the My Documents Properties dialog box, select the Shared As option and enter a share name that ends with $ in the Share Name text box. Then, specify the access type and a password if desired. Figure A shows the share name Hidden$ with full access dependent on a password.
|You can hide a shared folder by appending $ to the share name.|
After you enter the share name, click OK. If you’ve assigned a password to the shared folder, you’ll be prompted to confirm the password.
Accessing a hidden folder
Once you’ve set up the hidden shared folder, you need to know how to connect to it from another system on the network. To begin, let’s make sure that the shared My Documents folder is indeed hidden. To do so, you’ll launch Network Neighborhood and access the Neptune-98 system, as shown in Figure B. As you can see, it appears as though Neptune-98 doesn’t have any shared resources.
|The shared resource is indeed hidden.|
To connect to the hidden shared folder, you’ll need to click the Map Network Drive button on the toolbar. When you see the Map Network Drive dialog box, you’ll type the Universal Naming Convention (UNC) path and share name for the hidden folder in the Path text box. In the case of our example, you’d type the UNC path to the Hidden$ resource on the system named Neptune-98, as shown in Figure C.
Adding the Map Network Drive button
If you don’t see the Map Network Drive button on the toolbar, select View | Folder Options from the menu bar. When the Folder Options dialog box appears, click the View tab, select the Show Map Network Drive Button In Toolbar check box, and click OK.
|To connect to a hidden resource, you must use the Map Network Drive dialog box.|
To complete the connection, click OK. If you specified a password, you’ll first see an Enter Network Password dialog box similar to the one shown in Figure D. Once you enter the password, Windows connects to the hidden, shared folder and you can access its files just as you would any other shared folder.
|If you’ve assigned a password to the shared folder, Windows prompts you to enter it before you can access the folder.|
Hiding a shared printer
Now that you know how to hide a shared folder and connect to it, let’s take a look at how you go about hiding a shared printer. Suppose that the system on which you want to set up the hidden, shared printer is named Sun and is equipped with an HP LaserJet IIIP Plus printer.
To begin, launch My Computer and open the Printers folder. Right-click the HP LaserJet printer icon and choose Sharing from the shortcut menu. When you do, Windows will display the Sharing tab in the printer’s HP LaserJet IIIP Properties dialog box. To share the printer, select the Shared As option and then, in the Share Name text box, enter a share name that ends with $. You can also assign a password to the printer in the Password text box. At this point, your printer’s Sharing tab should look similar to the one shown in Figure E.
|To hide a shared printer, you append $ to the share name.|
To complete the procedure, click OK. If you’ve assigned a password to the shared printer, you’ll be prompted to confirm it.
Connecting to a hidden printer
Now that you’ve set up a hidden, shared printer, you’ll want to connect to it from another system. To begin, launch My Computer and open the Printers folder. Next, double-click the Add Printer icon to launch the Add Printer Wizard. Select the Network printer option when the wizard asks how the printer is attached to your computer.
When the Add Printer Wizard prompts you for the path to the network printer, you have two choices: You can either click Browse and scan the workgroup for a shared printer to connect to, or you can enter the UNC path to the shared printer.
If you click Browse and scan the workgroup, you won’t see the printer on the system named Sun, as shown in Figure F.
|Since the shared printer is hidden, it doesn’t appear in the Browse For Printer dialog box.|
To connect to the hidden, shared printer, you must use the UNC format for accessing network resources and add the dollar sign ($) to the resource name.
For example, to access the hidden, shared printer on the example system, Sun, you’d complete the Network Path Or Queue Name text box, as shown in Figure G. When you’re finished, click Next to continue the installation.
|To connect to a hidden, shared printer, you must use the UNC format.|
If you’ve assigned a password to the printer, anyone attempting to use the printer will be prompted to enter the password, as shown in Figure H. When you enter the password, Windows connects your system to the hidden, shared printer.
|If you’ve assigned the printer a password, Windows prompts you to enter it before you can access the printer.|
Hiding shared resources from the local user
As you know, when you share a resource, Windows changes that resource’s icon to one with a hand holding the resource. That means that anyone using the system can tell that the resource is being shared, which is not a big deal in most circumstances. However, what if you want to keep an eye on a particular user’s hard disk to make sure she isn’t downloading and installing prohibited software? Wouldn’t it be nice if you could share and access the user’s hard disk without her knowing it? Having encountered this very situation myself, I discovered that there’s a way to prevent Windows from changing the icon when you share a resource by making a simple change in the registry.
To begin, launch the Registry Editor and navigate to the following key:
Once you open the SharingHandler key, double-click the Default string value to open the Edit String dialog box. Then, simply delete the contents of the Value Data text box and click OK. (In Windows 9x/Me, that value is Msshrui.dll; in Windows 2000 and Windows XP, the value is Ntshrui.dll.)
Then, close the Registry Editor and restart the system. If, at a later date, you want to allow Windows to change the icon, simply access the SharingHandler key and replace it with the Msshrui.dll or Ntshrui.dll value.
Subscribe to the Microsoft Weekly Newsletter
Be your company's Microsoft insider by reading these Windows and Office tips, tricks, and cheat sheets. Delivered Mondays and Wednesdays