SoFunction
Updated on 2025-04-09

Five tricks to block the Windows operating system by default

1. Right-click the "stop sharing" method

Right-click on a shared item (such as H$) in the "Computer Management" window, select "Stop Sharing" and confirm, the share will be closed. The share icon below will disappear. Repeat several times and all items can be stopped.


Note: But this method can treat the symptoms but not the root cause. If the machine restarts, these sharing will be restored. This method is more suitable for servers that never shut down, it is simple and effective.




2. Batch processing self-start method




Open Notepad and enter the following content (remember to press Enter for each line at the end):


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, just write a few lines of such commands)


Save as (note the suffix!), and drag the batch file to the "Program" → "Start" item so that it will run every time you boot, that is, close the sharing via the net command.


If one day you need to enable a certain or certain sharing, just re-edit the batch file (delete the corresponding command line).


3. Register table key-value method


"Start" → "Run" After entering "regedit" to confirm, open the registry editor and find the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" item, double-click the "AutoShareServer" item in the right window to change the key value from 1 to 0, so that the sharing of each partition of the hard disk can be closed. If there is no AutoShareServer item, you can create a new one and change the key value. Then, in this window, find the "AutoShareWks" item, change the key value from 1 to 0, and close admin$ sharing. Finally, find "restrictanonymous" at the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" item, set the key value to 1, and turn off IPC$ sharing.


Note: This method must restart the machine, but it will stop sharing forever once it is changed.


4. Stop service method


Or go to the Computer Management window, click Expand Services and Applications on the left and select Services. All service items are listed on the right. The name corresponding to the shared service is "Server" (the name in the process is services). After finding it, double-click it and change the "Startup Type" from the original "Auto" to "Disabled" in the pop-up "General" tab. Then click the "Stop" button in "Service Status" below, and confirm again and it will be OK.


5. Uninstall the "File and Printer Sharing" method


Right-click "Online Neighbor" to select "Properties", right-click "Local Connection" to select "Properties" in the "Network and Dial-up Connection" window that pops up, select "File and Printer Sharing for Microsoft Networks" from "This connection uses the selected components below", click the "Uninstall" button below and confirm.


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