一键开启局域网共享
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
一键开启局域网共享
将一下红色代码放入记事本,另存为.bat 格式运行
@ECHO OFF
cls
echo.
echo.
echo 1. 开启匿名访问2.启用验证访问(需要输入用户名密码) 3.关闭共享4.返回
echo.
echo.
set choice=
set /p choice= ●请选择‖
if /i "%choice%"=="1" goto share1
if /i "%choice%"=="2" goto share2
if /i "%choice%"=="3" goto share3
if /i "%choice%"=="4" goto end
goto share
:share1
cls
net user Guest /active:yes
echo Windows Registry Editor Version 5.00 >share.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa] >>share.reg
echo "restrictanonymous"=dword:00000000 >>share.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] >>share.reg
echo "restrictanonymous"=dword:00000000 >>share.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] >>share.reg
echo "limitblankpassworduse"=dword:00000000 >>share.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa] >>share.reg
echo "limitblankpassworduse"=dword:00000000 >>share.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] >>share.reg
echo "forceguest"=dword:00000001 >>share.reg
echo
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{750 48700-EF1F-11D0-9888-006097DEACF9}\Count] >>share.reg
echo "HRZR_EHAPCY"=hex:0C,00,00,00,26,00,00,00,F0,FB,E5,52,64,95,C6,01 >>share.reg
echo "HRZR_EHAPCY:"P:\JVAQBJF\flfgrz32\sverjnyy.pcy",Jvaqbjf 防火墙"=hex:0C,00,00,00,08,00,00,00,F0,FB,E5,52,64,95,C6,01 >>share.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\Firewall Policy\StandardProfile\GloballyOpenPorts\List] >>share.reg
echo "445:TCP"="445:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22005" >>share.reg
echo "137:UDP"="137:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22001" >>share.reg
echo "138:UDP"="138:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22002" >>share.reg
echo "139:TCP"="139:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22004" >>share.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Epoch] >>share.reg
echo "Epoch"=dword:000001ED >>share.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Providers] >>share.reg
echo "LogonTime"=hex:E8,31,8E,4F,64,95,C6,01 >>share.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPoli cy\StandardProfile\GloballyOpenPorts\List] >>share.reg
echo "445:TCP"="445:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22005" >>share.reg
echo "137:UDP"="137:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22001" >>share.reg
echo "138:UDP"="138:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22002" >>share.reg
echo "139:TCP"="139:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22004" >>share.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Epoch] >>share.reg echo "Epoch"=dword:000001ED >>share.reg
regedit /s share.reg
del share.reg
echo.
echo.
echo √. 局域网匿名访问已开启ゞ
echo 注意:本机要重启后才会生效。
echo ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
echo.
exit
//& goto logon
:end
goto logon
:share2
cls
net user Guest /active:no
echo Windows Registry Editor Version 5.00 >usershare.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa] >>usershare.reg
echo "restrictanonymous"=dword:00000000 >>usershare.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] >>usershare.reg
echo "restrictanonymous"=dword:00000000 >>usershare.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] >>usershare.reg
echo "limitblankpassworduse"=dword:00000000 >>usershare.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa] >>usershare.reg
echo "limitblankpassworduse"=dword:00000000 >>usershare.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] >>usershare.reg
echo "forceguest"=dword:00000000 >>usershare.reg
echo
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{750 48700-EF1F-11D0-9888-006097DEACF9}\Count] >>usershare.reg
echo "HRZR_EHAPCY"=hex:0C,00,00,00,26,00,00,00,F0,FB,E5,52,64,95,C6,01 >>usershare.reg echo "HRZR_EHAPCY:"P:\JVAQBJF\flfgrz32\sverjnyy.pcy",Jvaqbjf 防火墙"=hex:0C,00,00,00,08,00,00,00,F0,FB,E5,52,64,95,C6,01 >>usershare.reg echo