求一WIN7系统共享设置打开和关闭的批处理
WIN7系统共享文件时要在网络共享中心,高级共享设置中启用网络发现,启用网络和打印机共享,启用共享以方便网络用户可以读取和写入公用文件的的文件,关闭共享密码保护很费事求一...
WIN7系统 共享文件时要在网络共享中心,高级共享设置中启用网络发现,启用网络和打印机共享,启用共享以方便网络用户可以读取和写入公用文件的的文件,关闭共享密码保护很费事求一个批处理用于打开和关闭这些设置
展开
2个回答
展开全部
@echo off
chcp|find "936">nul&&goto sc
chcp|find "950">nul&&goto tc
:sc
title 【 局域网共享一键修复 】
color 2f
echo.&echo.
echo 【 重 要 提 示 】
echo.&echo.
echo ★★★ 要使用本程序成功修复共享失败请务必做好以下几点 ★★★
echo.&echo.
echo 正确设置计算机的工作组和IP地址;
echo.
echo 给共享文件(夹)添加everyone权限;
echo.
echo 关闭或禁用已安装的其他防火墙软件;
echo.
echo 必须在共享双方的系统中运行本程序;
echo.
echo 待本程序修复完毕后必须重启计算机;
echo.&echo.&echo.&echo.
echo 按下任意键开始修复...
pause >nul
cls
echo.&echo.&echo.&echo.&echo.&echo.
echo 正在进行修复...
echo.&echo.
echo 稍后程序自动关闭,请手动重启计算机!
goto main
:tc
goto main
:main
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
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |