|
|
- cd /d %~dp0
- @echo off
- color 2f
- mode con cols=50 lines=30
- title Bulid 15.8.11 by:ALKKT
- :sc_top
- cls
- rd /s /q %temp%\okshare>nul 2>nul
- md %temp%\okshare
- ver | findstr "5.1">nul && goto sc_menu
- ver | findstr "6.">nul && echo nt6>%temp%\okshare\nt6.txt && goto sc_menu
- ver | findstr "10.">nul && goto sc_menu
- ver | findstr "5.2">nul && echo 2k3>%temp%\okshare\2k3.txt && goto sc_menu
- echo.&echo.&echo.&echo.&echo.&echo.&echo.
- ver
- echo.
- echo --------------------------------------------
- echo.&echo.&echo.&echo.
- echo 软件不支持该系统,请反馈作者!
- pause>nul 2>nul
- exit
- :sc_menu
- echo.&echo.&echo.
- echo 局域网共享一键修复
- echo.
- echo --------------------------------------------
- echo.&echo.&echo.
- echo 1、查看本机信息
- echo.
- echo 2、一键修复(推荐)
- echo.
- echo 3、手动高级修复
- echo.
- echo 4、实用工具箱
- echo.
- echo 5、软件更新、反馈
- echo.
- echo 6、退 出
- echo.&echo.&echo.&echo.&echo.&echo.
- set select=
- set str1=123456
- set /p select= 输入数字,按回车:
- if not defined select goto sc_wrong
- echo %select%|findstr "[%str1%]">nul||goto sc_wrong
- if %select%==1 (goto sc_info)
- if %select%==2 (goto sc_zd)
- if %select%==3 (goto sc_sd)
- if %select%==4 (goto sc_tools)
- if %select%==5 (goto sc_update)
- if %select%==6 (goto sc_exit)
- :sc_wrong
- echo msgbox "只能输入数字 1-6",,"提 示" >%temp%\okshare\404.vbs
- start /w %temp%\okshare\404.vbs
- goto sc_top
- :sc_info
- cls
- echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.
- echo 正在检索信息....
- if exist %temp%\okshare\nt6.txt goto sc_nt6
- :sc_nt5
- echo.>>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- ping www.baidu.com -n 1 >nul || goto sc_offline5
- echo 当前网络状态: [ 在线 ]>>%temp%\okshare\info.txt & goto sc_ver_nt5
- :sc_offline5
- echo 当前网络状态: [ 离线 ]>>%temp%\okshare\info.txt
- :sc_ver_nt5
- echo ---------------------------------------------------------->>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- for /f "skip=1 tokens=2-4 delims=, " %%a in ('wmic os get caption') do (
- if exist %windir%\SysWOW64 echo 系统版本: %%a %%b %%c 64位>>%temp%\okshare\info.txt & goto sc_ver_nt5_next
- echo 系统版本: %%a %%b %%c 32位>>%temp%\okshare\info.txt
- )
- :sc_ver_nt5_next
- echo.>>%temp%\okshare\info.txt
- echo 计算机名: %COMPUTERNAME%>>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- for /f "tokens=2 delims= " %%a in ('net config workstation^|findstr /c:"工作站域"') do echo 工作组: %%a>>%temp%\okshare\info.txt & goto sc_info_nt5
- :sc_info_nt5
- echo.>>%temp%\okshare\info.txt
- echo 当前用户: %USERNAME%>>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- for /f "delims=" %%a in ('date /t') do echo 本机日期: %%a>>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- for /f "delims=" %%a in ('time /t') do echo 本机时间: %%a>>%temp%\okshare\info.txt
- echo ---------------------------------------------------------->>%temp%\okshare\info.txt
- goto sc_info_more
- :sc_nt6
- echo.>>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- ping www.baidu.com -n 1 >nul || goto sc_offline6
- echo 当前网络状态: [ 在线 ]>>%temp%\okshare\info.txt & goto sc_ver_nt6
- :sc_offline6
- echo 当前网络状态: [ 离线 ]>>%temp%\okshare\info.txt
- :sc_ver_nt6
- echo -------------------------------------------------->>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- for /f "skip=1 tokens=2-5 delims=?, " %%a in ('wmic os get caption') do (
- if exist %windir%\SysWOW64 echo 系统版本: %%a %%b %%c %%d 64位>>%temp%\okshare\info.txt & goto sc_ver_nt6_next
- echo 系统版本: %%a %%b %%c %%d 32位>>%temp%\okshare\info.txt
- )
- :sc_ver_nt6_next
- echo.>>%temp%\okshare\info.txt
- echo 计算机名: %COMPUTERNAME%>>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- for /f "tokens=2 delims= " %%a in ('net config workstation^|findstr /c:"工作站域"') do echo 工作组: %%a>>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- echo 当前用户: %USERNAME%>>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- for /f "delims=" %%a in ('date /t') do echo 本机日期: %%a>>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- for /f "delims=" %%a in ('time /t') do echo 本机时间: %%a>>%temp%\okshare\info.txt
- echo -------------------------------------------------->>%temp%\okshare\info.txt
- :sc_info_more
- ipconfig /all>%temp%\okshare\temp.txt
- if exist %temp%\okshare\nt6.txt findstr /v /c:"Windows IP 配置" %temp%\okshare\temp.txt|findstr /v /c:"主机名"|findstr /v /c:"主 DNS 后缀"|findstr /v /c:"节点类型"|findstr /v /c:"IP 路由已启用"|findstr /v /c:"WINS 代理已启用">>%temp%\okshare\info.txt & goto sc_info_more2
- findstr /v /c:"Windows IP Configuration" %temp%\okshare\temp.txt|findstr /v /c:"Host Name"|findstr /v /c:"Primary Dns Suffix"|findstr /v /c:"Node Type"|findstr /v /c:"IP Routing Enabled"|findstr /v /c:"WINS Proxy Enabled">>%temp%\okshare\info.txt
- :sc_info_more2
- findstr /i "隧道 teredo" %temp%\okshare\temp.txt>nul||goto sc_info_next
- echo.>>%temp%\okshare\info.txt
- echo.>>%temp%\okshare\info.txt
- echo --------------------------------------------------------------->>%temp%\okshare\info.txt
- echo 【注意】:过多的隧道适配器会拖慢系统速度,不用时建议关闭!>>%temp%\okshare\info.txt
- echo 【方法】:主菜单/实用工具箱/关闭隧道适配器,需要时再开启。>>%temp%\okshare\info.txt
- :sc_info_next
- start /w notepad %temp%\okshare\info.txt
- goto sc_top
- :sc_zd
- cls
- echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.
- echo 正在修复....
- goto sc_main
- :sc_sd
- cls
- echo.&echo.&echo.
- echo 【如果一键修复未解决,再尝试】
- echo.
- echo ------------------------------------------
- echo.&echo.&echo.
- echo 1、修复共享文件夹无法被访问
- echo.&echo.
- echo 2、修复网络连接属性无法打开
- echo.&echo.
- echo 3、返回主菜单
- echo.&echo.
- echo 4、退 出
- echo.&echo.&echo.&echo.&echo.&echo.
- set input=
- set var=1234
- set /p input= 输入数字,按回车:
- if not defined input goto sc_wrong_sd
- echo %input%|findstr "[%var%]">nul||goto sc_wrong_sd
- if %input%==1 (goto sc_sd_wjj)
- if %input%==2 (goto sc_sd_reg)
- if %input%==3 (goto sc_top)
- if %input%==4 (goto sc_exit)
- :sc_wrong_sd
- echo msgbox "只能输入数字 1-4",,"提 示" >%temp%\okshare\404.vbs
- start /w %temp%\okshare\404.vbs
- goto sc_sd
- :sc_sd_wjj
- cls
- echo.&echo.&echo.&echo.
- set lj=
- echo 粘贴文件夹路径(有空格加英文引号),按回车:
- set /p lj=
- if not defined lj goto sc_sd_wjj_wrong
- echo.&echo.&echo.&echo.
- echo 任意输入共享名称,按回车:
- set /p name=
- if not defined name goto sc_sd_wjj_wrong
- net share %name%=%lj%>nul 2>nul
- cacls %lj% /p everyone:r /e>nul 2>nul
- cls
- echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.
- echo 正在修复....
- goto sc_tip
- :sc_sd_wjj_wrong
- echo msgbox "输入不能为空",,"提 示" >%temp%\okshare\404.vbs
- start /w %temp%\okshare\404.vbs
- del /q %temp%\okshare\404.vbs>nul 2>nul
- goto sc_sd_wjj
- :sc_sd_reg
- cls
- echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.
- echo 正在修复....
- start /w regsvr32 /s atl.dll>nul 2>nul
- start /w regsvr32 /s Netcfgx.dll>nul 2>nul
- start /w regsvr32 /s netshell.dll>nul 2>nul
- start /w regsvr32 /s Netman.dll>nul 2>nul
- goto sc_tip
- :sc_main
- echo Windows Registry Editor Version 5.00>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- sc config LanmanWorkstation start= auto>nul 2>nul
- sc config LanmanServer start= auto>nul 2>nul
- sc config Winmgmt start= auto>nul 2>nul
- sc config RpcSs start= auto>nul 2>nul
- sc config Netman start= auto>nul 2>nul
- sc config RasMan start= demand>nul 2>nul
- sc config SSDPSRV start= auto>nul 2>nul
- sc config BFE start= auto>nul 2>nul
- sc config ALG start= demand>nul 2>nul
- sc config SharedAccess start= auto>nul 2>nul
- net start SharedAccess /y>nul 2>nul
- sc config Browser start= auto>nul 2>nul
- net start Browser /y>nul 2>nul
- sc config Dnscache start= auto>nul 2>nul
- net start Dnscache /y>nul 2>nul
- sc config Dhcp start= auto>nul 2>nul
- net start Dhcp /y>nul 2>nul
- sc config lmhosts start= auto>nul 2>nul
- net start lmhosts /y>nul 2>nul
- sc config Spooler start= auto>nul 2>nul
- net start Spooler /y>nul 2>nul
- sc config upnphost start= demand>nul 2>nul
- net start upnphost /y>nul 2>nul
- sc config Netlogon start= demand>nul 2>nul
- net start Netlogon /y>nul 2>nul
- if exist %temp%\okshare\nt6.txt goto sc_win7
- :sc_winxp
- sc config PlugPlay start= auto>nul 2>nul
- sc config TapiSrv start= auto>nul 2>nul
- sc config Nla start= auto>nul 2>nul
- net start Nla /y>nul 2>nul
- netsh firewall set opmode mode=disable>nul 2>nul
- if exist %temp%\okshare\2k3.txt goto sc_main2_2k3
- goto sc_main2_etc
- :sc_win7
- sc config DcomLaunch start= auto>nul 2>nul
- sc config RpcEptMapper start= auto>nul 2>nul
- sc config SamSs start= auto>nul 2>nul
- sc config nsi start= auto>nul 2>nul
- sc config SstpSvc start= demand>nul 2>nul
- sc config MpsSvc start= auto>nul 2>nul
- net start MpsSvc /y>nul 2>nul
- sc config NlaSvc start= auto>nul 2>nul
- sc config netprofm start= auto>nul 2>nul
- sc config fdPHost start= auto>nul 2>nul
- sc config FDResPub start= auto>nul 2>nul
- sc config HomeGroupListener start= auto>nul 2>nul
- sc config WMPNetworkSvc start= auto>nul 2>nul
- net start WMPNetworkSvc /y>nul 2>nul
- sc config HomeGroupProvider start= auto>nul 2>nul
- net start HomeGroupProvider /y>nul 2>nul
- netsh advfirewall set allprofiles state off>nul 2>nul
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0]>>%temp%\okshare\okshare.reg
- echo "NtlmMinClientSec"=dword:00000000>>%temp%\okshare\okshare.reg
- echo "NtlmMinServerSec"=dword:00000000>>%temp%\okshare\okshare.reg
- echo "LmCompatibilityLevel"=dword:00000001>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- goto sc_main2_etc
- :sc_main2_2k3
- net user guest /active:no>nul 2>nul
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>>%temp%\okshare\okshare.reg
- echo "forceguest"=dword:00000000>>%temp%\okshare\okshare.reg
- echo "restrictanonymoussam"=dword:00000001>>%temp%\okshare\okshare.reg
- goto sc_main2
- :sc_main2_etc
- net user guest /active:yes>nul 2>nul
- echo [Unicode]>>%temp%\okshare\admin_sec.inf
- echo Unicode=yes>>%temp%\okshare\admin_sec.inf
- echo [Version]>>%temp%\okshare\admin_sec.inf
- echo signature="$CHICAGO$">>%temp%\okshare\admin_sec.inf
- echo Revision=1>>%temp%\okshare\admin_sec.inf
- echo [Privilege Rights]>>%temp%\okshare\admin_sec.inf
- echo sedenynetworklogonright = >>%temp%\okshare\admin_sec.inf
- echo senetworklogonright = Everyone,Administrators,Users,Power Users,Backup Operators,guest>>%temp%\okshare\admin_sec.inf
- secedit /configure /db %temp%\okshare\admin_sec.sdb /cfg %temp%\okshare\admin_sec.inf /log %temp%\okshare\admin_sec.log /quiet
- del /q %temp%\okshare\admin_sec.*>nul 2>nul
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>>%temp%\okshare\okshare.reg
- echo "forceguest"=dword:00000001>>%temp%\okshare\okshare.reg
- echo "limitblankpassworduse"=dword:00000000>>%temp%\okshare\okshare.reg
- echo "restrictanonymous"=dword:00000000>>%temp%\okshare\okshare.reg
- echo "restrictanonymoussam"=dword:00000000>>%temp%\okshare\okshare.reg
- echo "everyoneincludesanonymous"=dword:00000001>>%temp%\okshare\okshare.reg
- echo "NoLmHash"=dword:00000000>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters]>>%temp%\okshare\okshare.reg
- echo "AutoShareServer"=dword:00000000>>%temp%\okshare\okshare.reg
- echo "AutoShareWks"=dword:00000000>>%temp%\okshare\okshare.reg
- echo "restrictnullsessaccess"=dword:00000000>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- :sc_main2
- net use * /del /y>nul 2>nul
- net config server /hidden:no>nul 2>nul
- net share ipc$>nul 2>nul
- echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace\{D6277990-4C6A-11CF-8D87-00AA0060F5BF}]>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser\Parameters]>>%temp%\okshare\okshare.reg
- echo "MaintainServerList"="Auto">>%temp%\okshare\okshare.reg
- echo "IsDomainMaster"="FALSE">>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- regedit /s %temp%\okshare\okshare.reg
- goto sc_tip
- :sc_tools
- cls
- del /q %temp%\okshare\*.* >nul 2>nul
- echo.&echo.&echo.
- echo 实用工具箱
- echo.
- echo --------------------------------------------
- echo.&echo.&echo.
- echo 1、关闭隧道适配器
- echo.
- echo 2、开启隧道适配器
- echo.
- echo 3、校准系统时间
- echo.
- echo 4、加固系统安全
- echo.
- echo 5、返回主菜单
- echo.
- echo 6、退 出
- echo.&echo.&echo.&echo.&echo.&echo.
- set num=
- set str2=123456
- set/p num= 输入数字,按回车:
- if not defined num goto sc_tools_wrong
- echo %num%|findstr "[%str2%]">nul||goto sc_tools_wrong
- if %num%==1 (goto sc_shut)
- if %num%==2 (goto sc_open)
- if %num%==3 (goto sc_time)
- if %num%==4 (goto sc_jg)
- if %num%==5 (goto sc_top)
- if %num%==6 (goto sc_exit)
- :sc_tools_wrong
- echo msgbox "只能输入数字 1-6",,"提 示" >%temp%\okshare\404.vbs
- start /w %temp%\okshare\404.vbs
- goto sc_tools
- :sc_shut
- ipconfig >%temp%\okshare\temp.txt
- findstr /i "隧道 teredo 通道" %temp%\okshare\temp.txt>nul||echo msgbox "未发现隧道适配器!",,"提 示">%temp%\okshare\404.vbs && goto sc_teredo_tip
- if exist %windir%\SysWOW64 devcon64 disable *isatap>>%temp%\okshare\teredo.txt & devcon64 disable *6to4*>>%temp%\okshare\teredo.txt & devcon64 disable *teredo>>%temp%\okshare\teredo.txt & devcon64 disable *tunmp>>%temp%\okshare\teredo.txt & goto sc_shut_next
- devcon32 disable *isatap>>%temp%\okshare\teredo.txt
- devcon32 disable *6to4*>>%temp%\okshare\teredo.txt
- devcon32 disable *teredo>>%temp%\okshare\teredo.txt
- devcon32 disable *tunmp>>%temp%\okshare\teredo.txt
- :sc_shut_next
- echo msgbox "关闭成功!",,"提 示" >%temp%\okshare\404.vbs
- goto sc_teredo_tip
- :sc_open
- if exist %windir%\SysWOW64 devcon64 enable *isatap>>%temp%\okshare\teredo.txt & devcon64 enable *6to4*>>%temp%\okshare\teredo.txt & devcon64 enable *teredo>>%temp%\okshare\teredo.txt & devcon64 enable *tunmp>>%temp%\okshare\teredo.txt & goto sc_open_next
- devcon32 enable *isatap>>%temp%\okshare\teredo.txt
- devcon32 enable *6to4*>>%temp%\okshare\teredo.txt
- devcon32 enable *teredo>>%temp%\okshare\teredo.txt
- devcon32 enable *tunmp>>%temp%\okshare\teredo.txt
- :sc_open_next
- findstr /c:"device(s) are enabled" %temp%\okshare\teredo.txt>nul||echo msgbox "未发现隧道适配器!",,"提 示" >%temp%\okshare\404.vbs && goto sc_teredo_tip
- echo msgbox "开启成功!",,"提 示" >%temp%\okshare\404.vbs
- :sc_teredo_tip
- start /w %temp%\okshare\404.vbs
- goto sc_tools
- :sc_time
- cls
- Timedate.cpl
- goto sc_tools
- :sc_jg
- cls
- echo.&echo.&echo.&echo.
- echo === 目前支持加固以下内容 ===
- echo.&echo.
- echo 关闭计算机所有共享;
- echo.
- echo 禁用Guest来宾用户;
- echo.
- echo 关闭远程桌面和协助;
- echo.
- echo 禁止空密码远程登录;
- echo.
- echo 开启Windows防火墙;
- echo.
- echo 禁用远程注册表服务;
- echo.
- echo ------------------------------------------
- echo.&echo.&echo.&echo.
- echo 输入 y 开始 输入 n 返回
- set ch=
- set str3=yn
- set/p ch=
- if not defined ch goto sc_wrong_jg
- echo %ch%|findstr "[%str3%]">nul||goto sc_wrong_jg
- if %ch%==y (goto sc_safe)
- if %ch%==n (goto sc_tools)
- :sc_wrong_jg
- echo msgbox "只能输入 y 或 n ",,"提 示" >%temp%\okshare\404.vbs
- start /w %temp%\okshare\404.vbs
- del /q %temp%\okshare\404.vbs>nul 2>nul
- goto sc_jg
- :sc_safe
- cls
- echo.&echo.&echo.&echo.&echo.&echo.&echo.&echo.
- echo 正在加固....
- echo Windows Registry Editor Version 5.00>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- ver|find "6.">nul&&goto sc_7fw
- netsh firewall set opmode mode=enable>nul 2>nul
- sc config dfs start= disabled>nul 2>nul
- net stop dfs /y>nul 2>nul
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]>>%temp%\okshare\okshare.reg
- echo "fAllowToGetHelp"=dword:00000000>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- goto sc_jg2
- :sc_7fw
- netsh advfirewall set allprofiles state on>nul 2>nul
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Remote Assistance]>>%temp%\okshare\okshare.reg
- echo "fAllowToGetHelp"=dword:00000000>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- :sc_jg2
- sc config RemoteRegistry start= disabled>nul 2>nul
- net stop RemoteRegistry /y>nul 2>nul
- net user guest /active:no>nul 2>nul
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters]>>%temp%\okshare\okshare.reg
- echo "AutoShareServer"=dword:00000000>>%temp%\okshare\okshare.reg
- echo "AutoShareWks"=dword:00000000>>%temp%\okshare\okshare.reg
- echo "restrictnullsessaccess"=dword:00000001>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>>%temp%\okshare\okshare.reg
- echo "limitblankpassworduse"=dword:00000001>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]>>%temp%\okshare\okshare.reg
- echo "fDenyTSConnections"=dword:00000001>>%temp%\okshare\okshare.reg
- echo.&echo.>>%temp%\okshare\okshare.reg
- regedit /s %temp%\okshare\okshare.reg>nul 2>nul
- :sc_tip
- echo msgbox "修复完成,请重启计算机",,"提 示" >%temp%\okshare\404.vbs
- start /w %temp%\okshare\404.vbs
- goto sc_exit
- :sc_update
- cls
- start "%ProgramFiles%\Internet Explorer\iexplore.exe" "http://bbs.pcbeta.com/viewthread-802430-1-1.html"
- goto sc_top
- :sc_exit
- rd /s /q %temp%\okshare>nul 2>nul
- exit
复制代码
|
|