How to Disable File Sharing in Windows 7
Disable All File Sharing:
1) Go to Start and click on Control Panel.
2) Proceed to click View network status and tasks in Control Panel window.
3) Network and Sharing Center window will appear, proceed to click Change advanced sharing settings.
4) You will be shown Advanced sharing settings window, here you need to locate your current set profile, and turn off following file sharing settings. Click on Save changes at last. That’s it.
Turn off file and printer sharing
Turn off Public folder sharing (people logged on to this computer can still access these folders)
Turn off password protected sharing
Turn off media streaming
Turn Off File Sharing on Specific File/Folder Only:
1) If you just need to turn off file sharing on specific file/folder, just right click that shared file or folder and select Share with and finally click on Nobody.
Note: After disabling sharing on the folder, if you find out the folder’s properties is still shown shared (because parent folder is still shared). Don’t worry! The files in the folder are not shared anymore. If you don’t believe, test to access from other computers or check the sharing status of file's properties (detailed tab).