Disable File and Printer Sharing

In Windows XP, open Network Connections from the Control Panel. Right-click on the connection and choose Properties.
In the resulting dialog, uncheck the box labeled File and Printer Sharing for Microsoft Networks. In Vista, right-click on the Network icon in the system tray or open Network and Sharing Center from the Control Panel. Under Sharing and Discovery, choose Off for file sharing or printer sharing, depending on your needs.