• 局域网共享一键修复(转载)


    转载自 远景论坛 http://bbs.pcbeta.com/viewthread.php?tid=802430&extra=&page=1

    有个批处理,看起来不错。。。

       1: @echo off
       2: title 【 局域网共享一键修复 】2010.12.3    by:wnsdt
       3: color 2f
       4: echo.&;echo.
       5: echo                                 【 重 要 提 示 】
       6: echo.&;echo.&echo.  
       7: echo           ★★★   要想使用本程序修复共享失败请务必做到以下几点   ★★★
       8: echo.&;echo. 
       9: echo                       1、正确设置计算机的工作组和IP地址;
      10: echo.
      11: echo                       2、给共享文件(夹)添加everyone访问权限;
      12: echo.
      13: echo                       3、关闭或禁用已安装的第三方防火墙软件;
      14: echo.
      15: echo                       4、必须在共享双方的系统中运行本程序;
      16: echo.
      17: echo                       5、使用完本程序后必须重启计算机;
      18: echo.&;echo.&echo.&echo.
      19: echo    按任意键开始修复...
      20: echo.
      21: pause >;nul
      22: cls
      23: echo.&;echo.&echo.&echo.&echo.&echo.
      24: echo        正在进行修复...
      25: echo.&;echo.
      26: echo        稍后程序自动关闭,请手动重启计算机!
      27: copy /y browstat.exe %SystemRoot%\system32>;nul 2>nul
      28: copy /y ntrights.exe %SystemRoot%\system32>;nul 2>nul
      29: ver | find "5.1">;NUL && IF errorlevel 0 goto xp
      30: ver | find "6.1">;NUL && IF errorlevel 0 goto WIN7
      31: ver | find "6.0">;NUL && IF errorlevel 0 goto WIN7
      32: ver | find "5.2">;NUL && IF errorlevel 0 goto xp
      33: :xp
      34: start /w /min sc config RpcSs start= auto>;nul 2>nul
      35: start /w /min net start RpcSs>;nul 2>nul
      36: start /w /min sc config lanmanworkstation start= auto>;nul 2>nul
      37: start /w /min net start lanmanworkstation>;nul 2>nul
      38: start /w /min sc config LanmanServer start= auto>;nul 2>nul
      39: start /w /min net start LanmanServer>;nul 2>nul
      40: start /w /min sc config Browser start= auto>;nul 2>nul
      41: start /w /min net start Browser>;nul 2>nul
      42: start /w /min sc config PlugPlay start= auto>;nul 2>nul
      43: start /w /min net start PlugPlay>;nul 2>nul
      44: start /w /min sc config TapiSrv start= auto>;nul 2>nul
      45: start /w /min net start TapiSrv>;nul 2>nul
      46: start /w /min sc config RasMan start= auto>;nul 2>nul
      47: start /w /min net start RasMan>;nul 2>nul
      48: start /w /min sc config Netman start= auto>;nul 2>nul
      49: start /w /min net start Netman>;nul 2>nul
      50: start /w /min sc config Dnscache start= auto>;nul 2>nul
      51: start /w /min net start Dnscache>;nul 2>nul
      52: start /w /min sc config Dhcp start= auto>;nul 2>nul
      53: start /w /min net start Dhcp>;nul 2>nul
      54: start /w /min sc config lmhosts start= auto>;nul 2>nul
      55: start /w /min net start lmhosts>;nul 2>nul
      56: start /w /min sc config Nla start= auto>;nul 2>nul
      57: start /w /min net start Nla>;nul 2>nul
      58: start /w /min sc config Spooler start= auto>;nul 2>nul
      59: start /w /min net start Spooler>;nul 2>nul
      60: start /w /min sc config SSDPSRV start= auto>;nul 2>nul
      61: start /w /min net start SSDPSRV>;nul 2>nul
      62: start /w /min sc config upnphost start= auto>;nul 2>nul
      63: start /w /min net start upnphost>;nul 2>nul
      64: start /w /min netsh firewall set opmode mode=disable>;nul 2>nul
      65: goto next
      66: :win7
      67: start /w /min sc config nsi start= auto>;nul 2>nul
      68: start /w /min net start nsi>;nul 2>nul
      69: start /w /min sc config DcomLaunch start= auto>;nul 2>nul
      70: start /w /min net start DcomLaunch>;nul 2>nul
      71: start /w /min sc config RpcEptMapper start= auto>;nul 2>nul
      72: start /w /min net start RpcEptMapper>;nul 2>nul
      73: start /w /min sc config RpcSs start= auto>;nul 2>nul
      74: start /w /min net start RpcSs>;nul 2>nul
      75: start /w /min sc config SamSs start= auto>;nul 2>nul
      76: start /w /min net start SamSs>;nul 2>nul
      77: start /w /min sc config LanmanServer start= auto>;nul 2>nul
      78: start /w /min net start LanmanServer>;nul 2>nul
      79: start /w /min sc config lanmanworkstation start= auto>;nul 2>nul
      80: start /w /min net start lanmanworkstation>;nul 2>nul
      81: start /w /min sc config Browser start= auto>;nul 2>nul
      82: start /w /min net start Browser>;nul 2>nul
      83: start /w /min sc config Dnscache start= auto>;nul 2>nul
      84: start /w /min net start Dnscache>;nul 2>nul
      85: start /w /min sc config Dhcp start= auto>;nul 2>nul
      86: start /w /min net start Dhcp>;nul 2>nul
      87: start /w /min sc config NlaSvc start= auto>;nul 2>nul
      88: start /w /min net start NlaSvc>;nul 2>nul
      89: start /w /min sc config netprofm start= auto>;nul 2>nul
      90: start /w /min net start netprofm>;nul 2>nul
      91: start /w /min sc config fdPHost start= auto>;nul 2>nul
      92: start /w /min net start fdPHost>;nul 2>nul
      93: start /w /min sc config FDResPub start= auto>;nul 2>nul
      94: start /w /min net start FDResPub>;nul 2>nul
      95: start /w /min sc config HomeGroupProvider start= auto>;nul 2>nul
      96: start /w /min net start HomeGroupProvider>;nul 2>nul
      97: start /w /min sc config HomeGroupListener start= auto>;nul 2>nul
      98: start /w /min net start HomeGroupListener>;nul 2>nul
      99: start /w /min sc config Netman start= auto>;nul 2>nul
     100: start /w /min net start Netman>;nul 2>nul
     101: start /w /min sc config lmhosts start= auto>;nul 2>nul
     102: start /w /min net start lmhosts>;nul 2>nul
     103: start /w /min sc config Spooler start= auto>;nul 2>nul
     104: start /w /min net start Spooler>;nul 2>nul
     105: start /w /min sc config SSDPSRV start= auto>;nul 2>nul
     106: start /w /min net start SSDPSRV>;nul 2>nul
     107: start /w /min sc config upnphost start= auto>;nul 2>nul
     108: start /w /min net start upnphost>;nul 2>nul
     109: start /w /min netsh advfirewall set allprofiles state off>;nul 2>nul
     110: goto next
     111: :next
     112: start /w /min sc config ALG start= disabled>;nul 2>nul
     113: start /w /min net stop ALG>;nul 2>nul
     114: start /w /min net user guest /active>;nul 2>nul
     115: start /w /min Ntrights -u Guest +r SeNetworkLogonRight>;nul 2>nul
     116: start /w /min Ntrights -u Guest -r SeDenyNetworkLogonRight>;nul 2>nul
     117: start /w /min net config server /hidden:no>;nul 2>nul
     118: echo Windows Registry Editor Version 5.00>;>%temp%\okshare.reg
     119: echo.&;echo.>>%temp%\okshare.reg
     120: echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>;>%temp%\okshare.reg
     121: echo "forceguest"=dword:00000001>;>%temp%\okshare.reg
     122: echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>;>%temp%\okshare.reg
     123: echo "limitblankpassworduse"=dword:00000000>;>%temp%\okshare.reg
     124: echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>;>%temp%\okshare.reg
     125: echo "everyoneincludesanonymous"=dword:00000001>;>%temp%\okshare.reg
     126: echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>;>%temp%\okshare.reg
     127: echo "NoLmHash"=dword:00000000>;>%temp%\okshare.reg
     128: echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>;>%temp%\okshare.reg
     129: echo "restrictanonymous"=dword:00000000>;>%temp%\okshare.reg
     130: echo "restrictanonymoussam"=dword:00000000>;>%temp%\okshare.reg
     131: echo.&;echo.>>%temp%\okshare.reg
     132: echo [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Parameters]>;>%temp%\okshare.reg
     133: echo "restrictnullsessaccess"=dword:00000000>;>%temp%\okshare.reg
     134: echo.&;echo.>>%temp%\okshare.reg
     135: echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser\Parameters]>;>%temp%\okshare.reg
     136: echo "MaintainServerList"="Auto">;>%temp%\okshare.reg
     137: echo "IsDomainMaster"="FALSE">;>%temp%\okshare.reg
     138: echo.&;echo.>>%temp%\okshare.reg
     139: echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa]>;>%temp%\okshare.reg
     140: echo "limitblankpassworduse"=dword:00000000>;>%temp%\okshare.reg
     141: echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa]>;>%temp%\okshare.reg
     142: echo "restrictanonymous"=dword:00000000>;>%temp%\okshare.reg
     143: echo.&;echo.>>%temp%\okshare.reg
     144: echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0]>;>%temp%\okshare.reg
     145: echo "NtlmMinClientSec"=dword:00000000>;>%temp%\okshare.reg
     146: echo "NtlmMinServerSec"=dword:00000000>;>%temp%\okshare.reg
     147: echo.&;echo.>>%temp%\okshare.reg
     148: echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa\MSV1_0]>;>%temp%\okshare.reg
     149: echo "NtlmMinClientSec"=dword:00000000>;>%temp%\okshare.reg
     150: echo "NtlmMinServerSec"=dword:00000000>;>%temp%\okshare.reg
     151: echo.&;echo.>>%temp%\okshare.reg
     152: echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace\{2227A280-3AEA-1069-A2DE-08002B30309D}]>;>%temp%\okshare.reg
     153: echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace\{D6277990-4C6A-11CF-8D87-00AA0060F5BF}]>;>%temp%\okshare.reg
     154: echo.&;echo.>>%temp%\okshare.reg
     155: start /w regedit /s %temp%\okshare.reg
     156: del /q %temp%\okshare.reg>;nul 2>nul
     157: cls
     158: exit
  • 相关阅读:
    [LeetCode] Course Schedule
    [Algorithms] Topological Sort
    [Algorithms] Graph Traversal (BFS and DFS)
    [LeetCode] One Edit Distance
    [LeetCode] Summary Ranges
    [LeetCode] Missing Ranges
    [LeetCode] Fraction to Recurring Decimal
    17.Docker之使用dockerfile创建jdk镜像
    16.Docker之使用dockerfile创建nginx镜像
    7.Docker之dockerfile指令简介
  • 原文地址:https://www.cnblogs.com/lei1016cn/p/1909753.html
Copyright © 2020-2023  润新知