This networking feature is particularly useful onhome networksbut can be a security concern on public networks.
Instructions in this article apply to Windows 11, 10, 8, 7, Vista, and XP.
The quickest method is to open theRundialog box with theWin+Rkeyboard combination and enter the commandcontroland pressEnter.

OpenNetwork and Sharing Center.
From the left pane, chooseChange advanced sharing configs.
Listed here are the different networks you’re using.

If you want to disable file and printer sharing on the public connection, open that section.
Otherwise, choose a different one.
Some other sharing options might be available here too, depending on your version of Windows.

These might include options for public folder sharing,web connection discovery,HomeGroupand file sharing encryption.
Right-tap the online grid connection and go intoPropertiesand then theNetworkingtab.
Check or uncheckFile and Printer Sharing for Microsoft Networks.

Turn On or Off File and Printer Sharing in Windows Vista and XP
Open Control Panel.
In Windows Vista, chooseNetwork and Sharing Center.
InWindows XP, chooseNetwork Connectionsand then skip down to Step 5.

From the left pane, chooseManage online grid connections.
Right-poke the connection that should have printer and file sharing turned on or off, and selectProperties.
ClickOKto save the changes.
