Disable Windows sharing service, release 445 port
In the default configuration of Windows systems, will start a shared service for the LAN machines can be by, for example \\192.168.1.1
to access the system shared files and printers and other forms.
The service is mainly using 445 port for communication, we can command netstat -an | findstr :445
to confirm that the port is in use.
If you do not need to use the service, or wants to release 445 port for use by other applications, we can disable the Windows Sharing service.
Windows displays the name of shared services for the Server
actual service name LanmanServer
; another service that relies on this service display name of Computer Browser
the actual service name Browser
, the service maintains an updated list of computers on the network, and will appear on the left side of the Explorer under network project.
To disable and stop the two services, we can open the service ( services.msc
), which are found in these two services, the right to enter the property, you can choose to disable and stop.
In addition, we can also disable and stop related services through the command line.
sc config Browser start= disabled
sc stop Browser
sc config LanmanServer start= disabled
sc stop LanmanServer
When the service is stopped, we can find shared before this time has been inaccessible in the Explorer. And will be reported out one of the following error:
However, to make the release of Windows 445 ports, in addition to stop the service, we also need to reboot the computer.
After the reboot is complete, then execution was performed before netstat -an | findstr :445
order, we will find that had previously been occupied by the port has been released.
So far, we have succeeded to stop and disable the related services, the release of 445 ports.