Windows OS Shared by default

Source: Internet
Author: User
Tags net command

1. Right-click the "stop sharing" Method

Right-click a shared item (such as H $) in the "Computer Management" window, select "stop sharing", and close the sharing, the sharing icon below it disappears, and all projects can be stopped after repeated times.

Note: however, this method does not cure the problem. If the machine restarts, the sharing will be restored. This method is simple and effective for servers that never shut down.

Ii. Batch Processing self-starting method

Open notepad and enter the following content (remember to press enter at the end of each line ):

NET Share IPC $/delete
NET Share ADMIN $/delete
NET Share C $/delete
NET Share d $/delete
NET Share e $/delete

...... (If you have several hard disk partitions, write a few lines of such commands)

Save as notshare. BAT (note the suffix !), Then drag the batch processing file to"Program"→" Start ", so that it will be run every time it is started, that is, close sharing through the net command.

If you need to enable one or more shares on a specific day, you just need to edit the batch file (delete the corresponding command line ).

Iii. Key-Value Method for registry

"Start" → "run", enter "Regedit", and click "Registry Editor". Find "HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ LanmanServer \ Parameters, double-click the "AutoShareServer" item in the window on the right to change the key value from 1 to 0, so that the sharing of each partition of the hard disk can be disabled. If you do not have an AutoShareServer entry, you can create one and change the key value. In this window, find the "autoscaling wks" item, change the key value from 1 to 0, and disable ADMIN $ sharing. Finally, locate "restrictanonymous" in "HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ LSA", set the key value to 1, and disable IPC $ sharing.

Note: In this method, the machine must be restarted, but once changed, the sharing will never be stopped.

Iv. Service suspension method

In the "Computer Management" window, click "services and applications" on the left and select "services". All service projects are listed on the right. The name of the shared service is "server" (the name is services in the process). Double-click it, in the pop-up "general" tab, change "Startup Type" from "automatic" to "disabled ". Click the "stop" button in the "service status" below, and then confirm it.

5. Uninstall "file and printer sharing"

Right-click "Network Neighbor" and select "attribute". In the displayed "network and dial-up connection" window, right-click "Local Connection" and select "attribute ", select "file and printer sharing for Microsoft Network" from "Use the following selected components for this connection", click the "unmount" button below and confirm.

Note: The biggest drawback of this method is that when you right-click a folder, the "share" option in the pop-up shortcut menu disappears because the corresponding function service has been uninstalled!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.