Board logo

标题: [网络连接] win10如何批处理启用网络发现 [打印本页]

作者: tmp05    时间: 2020-4-11 21:10     标题: win10如何批处理启用网络发现

找到了win7批处理启用网络发现的批处理,但没用。谢谢!

以下是win7启用网络发现的批处理:
@echo off
:Win7网络发现依赖的服务:
nscache        DNS Client
:SSDPSRV        SSDP Discovery
lugPlay        Plug and Play
:FDResPub        Function Discovery Resource Publication 功能发现资源发布
sc query SSDPSRV|findstr /i "SSDPSRV state"
sc query Dnscache|findstr /i "Dnscache state"
sc query PlugPlay|findstr /i "lugPlay state"
sc query FDResPub|findstr /i "FDResPub state"
sc config SSDPSRV start= AUTO
sc config Dnscache start= AUTO
sc config PlugPlay start= AUTO
sc config FDResPub start= AUTO
sc start SSDPSRV
sc start Dnscache
sc start PlugPlay
sc start FDResPub
作者: tmp05    时间: 2020-4-12 10:51

有实践过的进。
作者: PlsrBig    时间: 2020-4-13 10:32

试试这个
  1. rem 启用来宾登录访问网上邻居
  2. reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /f /v "forceguest" /t REG_DWORD /d 0x1
  3. reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /f /v "everyoneincludesanonymous" /t REG_DWORD /d 0x1
  4. reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /f /v "LimitBlankPasswordUse" /t REG_DWORD /d 0x0
  5. reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /f /v "restrictanonymoussam" /t REG_DWORD /d 0x0
  6. reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /f /v "NoLmHash" /t REG_DWORD /d 0x0
  7. reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa\MSV1_0" /f /v "LmCompatibilityLevel" /t REG_DWORD /d 0x1
  8. reg add "HKLM\SYSTEM\ControlSet001\Services\LanmanWorkstation\Parameters" /f /v "AllowInsecureGuestAuth" /t REG_DWORD /d 0x1
  9. reg add "HKLM\SYSTEM\ControlSet001\Services\LanmanServer\Parameters" /f /v "restrictnullsessaccess" /t REG_DWORD /d 0x0
  10. rem 启用“Computer Browser”服务
  11. reg add "HKLM\SYSTEM\ControlSet001\Services\Netman" /f /v "Start" /t REG_DWORD /d 0x2
  12. reg add "HKLM\SYSTEM\ControlSet001\Services\SSDPSRV" /f /v "Start" /t REG_DWORD /d 0x2
  13. reg add "HKLM\SYSTEM\ControlSet001\Services\SharedAccess" /f /v "Start" /t REG_DWORD /d 0x2
  14. reg add "HKLM\SYSTEM\ControlSet001\Services\lmhosts" /f /v "Start" /t REG_DWORD /d 0x2
  15. reg delete "HKLM\SYSTEM\ControlSet001\Services\NetBT\Parameters" /f /v "SMBDeviceEnabled"
  16. reg delete "HKLM\SYSTEM\ControlSet001\Services\LanmanServer\Parameters" /f /v "SMB1"
  17. reg delete "HKLM\SYSTEM\ControlSet001\Services\LanmanServer\Parameters" /f /v "SMB2"
  18. reg add "HKLM\SYSTEM\ControlSet001\Services\netprofm" /f /v "Start" /t REG_DWORD /d 0x2
  19. reg add "HKLM\SYSTEM\ControlSet001\Services\fdPHost" /f /v "Start" /t REG_DWORD /d 0x2
  20. reg add "HKLM\SYSTEM\ControlSet001\Services\FDResPub" /f /v "Start" /t REG_DWORD /d 0x2
  21. reg add "HKLM\SYSTEM\ControlSet001\Services\WMPNetworkSvc" /f /v "Start" /t REG_DWORD /d 0x2
  22. rem 添加防火墙规则
  23. >nul 2>&1 netsh advfirewall firewall set rule group=\"网络发现\" new enable=Yes
  24. >nul 2>&1 netsh advfirewall firewall set rule group=\"文件和打印机共享\" new enable=Yes
  25. >nul 2>&1 net config server /hidden:no
  26. rem 修改本地安全策略中的:拒绝从网络访问计算机,将里面的Guest删除
  27. set "_tf=%temp%\%~n0.inf"
  28. >"%_tf%" (echo.[Unicode]
  29. echo.Unicode=yes
  30. echo.[Version]
  31. echo.signature="$CHICAGO$"
  32. echo.Revision=1
  33. echo.[Privilege Rights]
  34. echo.sedenynetworklogonright =
  35. echo.senetworklogonright = Everyone,Administrators,Users,Power Users,Backup Operators,guest)
  36. if not exist "%_tf%" goto:eof
  37. >nul 2>&1 secedit /configure /db "%_tf:inf=sdb%" /cfg "%_tf%" /log "%_tf:inf=log%" /quiet
  38. >nul 2>&1 del /q "%_tf:inf=*%"
复制代码

作者: tmp05    时间: 2020-4-13 16:36

本帖最后由 tmp05 于 2020-4-13 16:47 编辑

试了可用,但这个是要恢复镜像后运行能自动启用网络发现的,可否实现?谢谢!
作者: tmp05    时间: 2020-4-15 16:13

镜像恢复到C盘后第一个弹出的就是这个询问是否启动网络发现对话框,如何让这批处理运行自动启用?
作者: tmp05    时间: 2020-4-16 16:43

哪位能帮测试下就好了
作者: tmp05    时间: 2020-5-18 16:42

希望哪位关注下,谢谢。




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2