One-key shared batch processing for LAN in Windows

Source: Internet
Author: User
Tags goto

Save the following code set up Www.111cn.net.bat

The code is as follows Copy Code

@echo off

Color 2f
Echo.&echo.
echo "Important Tip www.111cn.net"
Echo.&echo.&echo.
echo★★★ If you want to use this program to repair a shared failure, be sure to do the following ★★★
Echo.&echo.
Echo 1, set the workgroup and IP address of the computer correctly;
Echo.
Echo 2, add everyone access to shared files (folders);
Echo.
Echo 3, turn off or disable installed third party firewall software;
Echo.
Echo 4, the program must be run on both sides of the shared system;
Echo.
Echo 5, you must restart your computer after you have finished using this program;
Echo.&echo.&echo.&echo.
echo presses any key to begin repair ...
Echo.
Pause >nul
Cls
Echo.&echo.&echo.&echo.&echo.&echo.
Echo is repairing ...
Echo.&echo.
echo the program shuts down automatically, please reboot the computer manually!
copy/y Browstat.exe%systemroot%\system32>nul 2>nul
copy/y Ntrights.exe%systemroot%\system32>nul 2>nul
ver | Find "5.1" >nul && IF errorlevel 0 goto XP
ver | Find "6.1" >nul && IF errorlevel 0 goto WIN7
ver | Find "6.0" >nul && IF errorlevel 0 goto WIN7
ver | Find "5.2" >nul && IF errorlevel 0 goto XP
: XP
start/w/min sc config RpcSs start= auto>nul 2>nul
start/w/min net start Rpcss>nul 2>nul
start/w/min sc config lanmanworkstation start= auto>nul 2>nul
start/w/min net start Lanmanworkstation>nul 2>nul
start/w/min sc config lanmanserver start= auto>nul 2>nul
start/w/min net start Lanmanserver>nul 2>nul
start/w/min sc config Browser start= auto>nul 2>nul
start/w/min net start Browser>nul 2>nul
start/w/min sc config plugplay start= auto>nul 2>nul
start/w/min net start Plugplay>nul 2>nul
start/w/min sc config tapisrv start= auto>nul 2>nul
start/w/min net start Tapisrv>nul 2>nul
start/w/min sc config rasman start= auto>nul 2>nul
start/w/min net start Rasman>nul 2>nul
start/w/min sc config Netman start= auto>nul 2>nul
start/w/min net start Netman>nul 2>nul
start/w/min sc config dnscache start= auto>nul 2>nul
start/w/min net start Dnscache>nul 2>nul
start/w/min sc config Dhcp start= auto>nul 2>nul
start/w/min net start Dhcp>nul 2>nul
start/w/min SC config lmhosts start= auto>nul 2>nul
start/w/min net start Lmhosts>nul 2>nul
start/w/min sc config Nla start= auto>nul 2>nul
start/w/min net start Nla>nul 2>nul
start/w/min sc config Spooler start= auto>nul 2>nul
start/w/min net start Spooler>nul 2>nul
start/w/min sc config ssdpsrv start= auto>nul 2>nul
start/w/min net start Ssdpsrv>nul 2>nul
start/w/min sc config upnphost start= auto>nul 2>nul
start/w/min net start Upnphost>nul 2>nul
start/w/min netsh firewall set opmode mode=disable>nul 2>nul
Goto Next
: Win7
start/w/min SC config NSI start= Auto>nul 2>nul
start/w/min net start Nsi>nul 2>nul
start/w/min sc config dcomlaunch start= auto>nul 2>nul
start/w/min net start Dcomlaunch>nul 2>nul
start/w/min sc config rpceptmapper start= auto>nul 2>nul
start/w/min net start Rpceptmapper>nul 2>nul
start/w/min sc config RpcSs start= auto>nul 2>nul
start/w/min net start Rpcss>nul 2>nul
start/w/min sc config samss start= auto>nul 2>nul
start/w/min net start Samss>nul 2>nul
start/w/min sc config lanmanserver start= auto>nul 2>nul
start/w/min net start Lanmanserver>nul 2>nul
start/w/min sc config lanmanworkstation start= auto>nul 2>nul
start/w/min net start Lanmanworkstation>nul 2>nul
start/w/min sc config Browser start= auto>nul 2>nul
start/w/min net start Browser>nul 2>nul
start/w/min sc config dnscache start= auto>nul 2>nul
start/w/min net start Dnscache>nul 2>nul
start/w/min sc config Dhcp start= auto>nul 2>nul
start/w/min net start Dhcp>nul 2>nul
start/w/min sc config nlasvc start= auto>nul 2>nul
start/w/min net start Nlasvc>nul 2>nul
start/w/min sc config NETPROFM start= auto>nul 2>nul
start/w/min net start Netprofm>nul 2>nul
start/w/min sc config fdphost start= auto>nul 2>nul
start/w/min net start Fdphost>nul 2>nul
start/w/min sc config fdrespub start= auto>nul 2>nul
start/w/min net start Fdrespub>nul 2>nul
start/w/min sc config homegroupprovider start= auto>nul 2>nul
start/w/min net start Homegroupprovider>nul 2>nul
start/w/min sc config homegrouplistener start= auto>nul 2>nul
start/w/min net start Homegrouplistener>nul 2>nul
start/w/min sc config Netman start= auto>nul 2>nul
start/w/min net start Netman>nul 2>nul
start/w/min SC config lmhosts start= auto>nul 2>nul
start/w/min net start Lmhosts>nul 2>nul
start/w/min sc config Spooler start= auto>nul 2>nul
start/w/min net start Spooler>nul 2>nul
start/w/min sc config ssdpsrv start= auto>nul 2>nul
start/w/min net start Ssdpsrv>nul 2>nul
start/w/min sc config upnphost start= auto>nul 2>nul
start/w/min net start Upnphost>nul 2>nul
start/w/min netsh advfirewall set allprofiles state Off>nul 2>nul
Goto Next
: Next
start/w/min sc config ALG start= disabled>nul 2>nul
start/w/min net stop Alg>nul 2>nul
start/w/min NET user Guest/active>nul 2>nul
start/w/min ntrights-u Guest +r senetworklogonright>nul 2>nul
start/w/min ntrights-u guest-r sedenynetworklogonright>nul 2>nul
start/w/min net config Server/hidden:no>nul 2>nul
echo Windows Registry Editor Version 5.00>>%temp%\okshare.reg
Echo.&echo.>>%temp%\okshare.reg
echo [Hkey_local_machine\system\currentcontrolset\control\lsa]>>%temp%\okshare.reg
echo "ForceGuest" =dword:00000001>>%temp%\okshare.reg
echo [Hkey_local_machine\system\currentcontrolset\control\lsa]>>%temp%\okshare.reg
echo "Limitblankpassworduse" =dword:00000000>>%temp%\okshare.reg
echo [Hkey_local_machine\system\currentcontrolset\control\lsa]>>%temp%\okshare.reg
echo "EveryoneIncludesAnonymous" =dword:00000001>>%temp%\okshare.reg
echo [Hkey_local_machine\system\currentcontrolset\control\lsa]>>%temp%\okshare.reg
echo "NoLMHash" =dword:00000000>>%temp%\okshare.reg
echo [Hkey_local_machine\system\currentcontrolset\control\lsa]>>%temp%\okshare.reg
echo "RestrictAnonymous" =dword:00000000>>%temp%\okshare.reg
echo "Restrictanonymoussam" =dword:00000000>>%temp%\okshare.reg
Echo.&echo.>>%temp%\okshare.reg
echo [Hkey_local_machine\system\currentcontrolset\services\lanmanserver\parameters]>>%temp%\okshare.reg
echo "RestrictNullSessAccess" =dword:00000000>>%temp%\okshare.reg
Echo.&echo.>>%temp%\okshare.reg
echo [Hkey_local_machine\system\currentcontrolset\services\browser\parameters]>>%temp%\okshare.reg
echo "MaintainServerList" = "Auto" >>%temp%\okshare.reg
echo "Isdomainmaster" = "FALSE" >>%temp%\okshare.reg
Echo.&echo.>>%temp%\okshare.reg
echo [Hkey_local_machine\system\controlset001\control\lsa]>>%temp%\okshare.reg
echo "Limitblankpassworduse" =dword:00000000>>%temp%\okshare.reg
echo [Hkey_local_machine\system\controlset001\control\lsa]>>%temp%\okshare.reg
echo "RestrictAnonymous" =dword:00000000>>%temp%\okshare.reg
Echo.&echo.>>%temp%\okshare.reg
echo [Hkey_local_machine\system\currentcontrolset\control\lsa\msv1_0]>>%temp%\okshare.reg
echo "NtlmMinClientSec" =dword:00000000>>%temp%\okshare.reg
echo "NtlmMinServerSec" =dword:00000000>>%temp%\okshare.reg
Echo.&echo.>>%temp%\okshare.reg
echo [Hkey_local_machine\system\controlset001\control\lsa\msv1_0]>>%temp%\okshare.reg
echo "NtlmMinClientSec" =dword:00000000>>%temp%\okshare.reg
echo "NtlmMinServerSec" =dword:00000000>>%temp%\okshare.reg
Echo.&echo.>>%temp%\okshare.reg
echo [-hkey_local_machine\software\microsoft\windows\currentversion\explorer\remotecomputer\namespace\{ 2227a280-3aea-1069-a2de-08002b30309d}]>>%temp%\okshare.reg
echo [-hkey_local_machine\software\microsoft\windows\currentversion\explorer\remotecomputer\namespace\{ D6277990-4c6a-11cf-8d87-00aa0060f5bf}]>>%temp%\okshare.reg
Echo.&echo.>>%temp%\okshare.reg
start/w regedit/s%temp%\okshare.reg
del/q%temp%\okshare.reg>nul 2>nul
Cls
Exit

Then double-click to achieve the LAN

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.