Turn off LAN sharing with BAT and Reg _dos/bat

Source: Internet
Author: User
Tags anonymous

Turn off LAN sharing. cmd

Copy Code code as follows:

@ ECHO off
@ ECHO.
@ ECHO. Description
@ ECHO----------------------------------------------------------
@ ECHO After this batch is executed, some of the following settings are made:
@ ECHO 1, anonymous enumeration that does not allow SAM accounts and shares (the original system is allowed by default).
@ ECHO 2, native account if the password is blank, do not allow other machines to access the local computer.
@ ECHO 3, Windows Firewall: File and printer sharing is not allowed.
@ ECHO 4, Guest account: disabled.
@ ECHO.
@ ECHO If you don't need to transfer files to and from your local area network, you can turn off the sharing feature to improve
@ ECHO Security. In particular, users of dial-up Internet access should turn off sharing.
@ ECHO----------------------------------------------------------
PAUSE
REGEDIT/S shut down the LAN share. reg
NET user Guest/active:no
Cls
@ ECHO.
@ ECHO----------------------------------------------------------
@ ECHO operation completed.
@ ECHO does not have to be restarted and the settings are in effect.
@ ECHO----------------------------------------------------------
PAUSE

, author of the special edition of GHOSTXP_SP2 computer company.

Turn off the LAN share. reg
Copy Code code as follows:

Windows Registry Editor Version 5.00

[Hkey_local_machine\system\controlset001\control\lsa]
"RestrictAnonymous" =dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"RestrictAnonymous" =dword:00000001
; The above two lines are located in the system: Local Security Policy-security option-Network access: Do not allow SAM accounts and shares
; An anonymous enumeration. The system defaults are: deactivated.
; Explanation: Operating system default: Use the ipc$ channel to establish a null connection, anonymous to cite how many accounts the machine. Obviously
; There is a certain safety hazard. This system has been set to disallow null connections. In order to improve the security of stand-alone dial-up Internet.
; The negative effect is that the LAN cannot exchange visits. You have to change it before you can solve it.




[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"Limitblankpassworduse" =dword:00000001

[Hkey_local_machine\system\controlset001\control\lsa]
"Limitblankpassworduse" =dword:00000001
; The location of the above two lines in the system is: Local Security policy--security option--account: Local account with blank password
; Only console logons are allowed. The system defaults are: Enabled.
; Explanation: Many people's accounts are not password-coded. In this way, when another computer on the local area network accesses this machine, it will eject the error message:
; Logon failure: User account limit ..... This is a security policy of the XP system that prevents people from taking advantage of your blank password
; Go to your computer. If you feel indifferent and do not have to do these limitations, set it to: deactivated.


[hkey_current_user\software\microsoft\windows\currentversion\explorer\userassist\{75048700- Ef1f-11d0-9888-006097deacf9}\count]
"Hrzr_ehapcy" =hex:0c,00,00,00,2a,00,00,00,90,af,a4,87,a4,95,c6,01
"Hrzr_ehapcy:" P:\JVAQBJF\flfgrz32\sverjnyy.pcy ", JVAQBJF Firewall" =HEX:0C,00,00,00,13,00,00,00,90,AF,A4,87,A4,95,C6, 01

[HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\CRYPTOGRAPHY\RNG]
"Seed" =hex:ac,6f,9a,2b,11,64,44,68,ec,90,1b,76,72,a7,0a,14,\
4c,79,37,bb,fd,bd,70,b2,b2,58,d5,b5,89,5c,b6,4e,\
3b,18,a5,26,46,bc,3e,6a,30,a4,7d,a0,56,e6,6a,b5,\
57,3a,bf,a1,cd,ca,b6,64,4c,f9,0e,d2,64,ed,86,1f,\
61,f6,d1,01,0b,7c,8d,bd,73,10,c8,4e,57,93,4e,90

[Hkey_local_machine\system\currentcontrolset\services\sharedaccess\parameters\firewallpolicy\standardprofile\ Globallyopenports\list]
"445:tcp" = "445:tcp:localsubnet:disabled: @xpsp2res. dll,-22005"
"137:UDP" = "137:udp:localsubnet:disabled: @xpsp2res. dll,-22001"
"138:UDP" = "138:udp:localsubnet:disabled: @xpsp2res. dll,-22002"
"139:tcp" = "139:tcp:localsubnet:disabled: @xpsp2res. dll,-22004"

[Hkey_local_machine\system\currentcontrolset\services\sharedaccess\epoch]
"Epoch" =DWORD:000001FC

[Hkey_local_machine\system\controlset001\services\sharedaccess\parameters\firewallpolicy\standardprofile\ Globallyopenports\list]
"445:tcp" = "445:tcp:localsubnet:disabled: @xpsp2res. dll,-22005"
"137:UDP" = "137:udp:localsubnet:disabled: @xpsp2res. dll,-22001"
"138:UDP" = "138:udp:localsubnet:disabled: @xpsp2res. dll,-22002"
"139:tcp" = "139:tcp:localsubnet:disabled: @xpsp2res. dll,-22004"

[Hkey_local_machine\system\controlset001\services\sharedaccess\epoch]
"Epoch" =DWORD:000001FC
; The above values correspond to the position in the system: Control Panel-Firewall-exception-file and printer sharing. System default: Not selected.
; Explanation: All the policies are set up, the LAN is still inaccessible, prompting: You do not have the right to use network resources, find
; Not to the network path! Oh, it's so furious! In fact, XP also has a checkpoint, is the firewall, must go through
; The firewall allows you to do so.

, written by the author of the GHOSTXP_SP2 Computer Company Special Edition. Thank you for your use.

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.