Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use bat and reg to turn off LAN sharing

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "how to use bat and reg to close LAN sharing", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use bat and reg to turn off LAN sharing" this article.

Turn off LAN sharing .cmd

The code is as follows:

@ ECHO OFF

@ ECHO.

@ ECHO. State clearly

@ ECHO--

@ ECHO after the execution of this batch, the following settings will be made:

@ ECHO 1. Anonymous enumeration of SAM accounts and shares is not allowed (the original system allows it by default).

@ ECHO 2. If the local account has an empty password, other computers are not allowed to access the machine.

@ ECHO 3, Windows Firewall: file and printer sharing is not allowed.

@ ECHO 4, Guest account: disabled.

@ ECHO.

@ ECHO if you do not need to transfer files to each other frequently on the local area network, you can turn off sharing to improve

@ ECHO security. In particular, users with stand-alone dial-up Internet access should turn off sharing.

@ ECHO--

PAUSE

Regedit / s closes local area network sharing .reg

Net user Guest / active:no

Cls

@ ECHO.

@ ECHO--

The @ ECHO operation is complete.

@ ECHO does not need to be restarted, the setting is already in effect.

@ ECHO--

PAUSE

Edited by the author of the Special Edition of GhostXP_SP2 computer Company.

Turn off LAN sharing .reg

The code is 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 location of the above two lines in the system is: local Security Policy-Security options-Network access: SAM account and sharing are not allowed

Anonymous enumeration of; The system default value is: disabled.

; explanation: operating system default: an empty connection can be established using the ipc$ channel. Enumerate the number of accounts on the machine anonymously. Obviously

There are certain security risks. This system has been set to not allow empty connections. In order to improve the security of dial-up Internet access on a single machine.

The negative effect is that the local area network can no longer exchange visits. It needs to be changed before it can be solved.

[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 options-accounts: local accounts with blank passwords

Only console logins are allowed. The system default value is: enabled.

; explanation: many people's accounts do not have a password. In this way, when another computer in the LAN accesses the local computer, an error message will pop up:

Login failure: user account restrictions. This is caused by a security policy of the XP system to prevent others from taking advantage of your empty password

Access to your computer. If you think it doesn't matter that you don't have to make these restrictions, set it to: disabled.

[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 797, 37pm, BB, FDD, 70pm, B2, 58, D5, 89, 5C, 4e, B6, 4e,\

3BMagne18, A5, 26, 46, BC, 3E, 6, 30, 4, 7, A0, 56, E6, 6A, 6, B5,\

57pens 3A, A1, CA, B6, 64, 4C, 0E, D2, 64, Ed, 86, 1F, 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 rig TCPV LocalSubnet DisabledRose xpsp2res.dlljung 22005"

"137:UDP" = "137VDP VDP Lock Subnet DisabledRose xpsp2res.dllJing Murray 22001"

"138:UDP" = "138 VDP VDP Lock Subnet DisabledDisabledRose xpsp2res.dllJing Murray 22002"

"139:TCP" = "139DisabledDisabledDisabledDisabledWrip 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 rig TCPV LocalSubnet DisabledRose xpsp2res.dlljung 22005"

"137:UDP" = "137VDP VDP Lock Subnet DisabledRose xpsp2res.dllJing Murray 22001"

"138:UDP" = "138 VDP VDP Lock Subnet DisabledDisabledRose xpsp2res.dllJing Murray 22002"

"139:TCP" = "139DisabledDisabledDisabledDisabledWrip 22004"

[HKEY_LOCAL_MACHINE\ SYSTEM\ ControlSet001\ Services\ SharedAccess\ Epoch]

"Epoch" = dword:000001FC

The above values correspond to the location in the system: control panel-firewall-exception-file and printer sharing. System default: not selected.

; explanation: all the policies have been set, the local area network is still inaccessible, hint: you do not have permission to use network resources, find

; do not reach the network path! Oh, it's really infuriating! In fact, XP also has another hurdle, that is, the firewall, which must be passed through.

Only with the permission of the firewall

The above is all the contents of the article "how to use bat and reg to turn off LAN sharing". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report