标题: [网络连接] 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
试试这个- rem 启用来宾登录访问网上邻居
- reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /f /v "forceguest" /t REG_DWORD /d 0x1
- reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /f /v "everyoneincludesanonymous" /t REG_DWORD /d 0x1
- reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /f /v "LimitBlankPasswordUse" /t REG_DWORD /d 0x0
- reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /f /v "restrictanonymoussam" /t REG_DWORD /d 0x0
- reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /f /v "NoLmHash" /t REG_DWORD /d 0x0
- reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa\MSV1_0" /f /v "LmCompatibilityLevel" /t REG_DWORD /d 0x1
- reg add "HKLM\SYSTEM\ControlSet001\Services\LanmanWorkstation\Parameters" /f /v "AllowInsecureGuestAuth" /t REG_DWORD /d 0x1
- reg add "HKLM\SYSTEM\ControlSet001\Services\LanmanServer\Parameters" /f /v "restrictnullsessaccess" /t REG_DWORD /d 0x0
-
- rem 启用“Computer Browser”服务
- reg add "HKLM\SYSTEM\ControlSet001\Services\Netman" /f /v "Start" /t REG_DWORD /d 0x2
- reg add "HKLM\SYSTEM\ControlSet001\Services\SSDPSRV" /f /v "Start" /t REG_DWORD /d 0x2
- reg add "HKLM\SYSTEM\ControlSet001\Services\SharedAccess" /f /v "Start" /t REG_DWORD /d 0x2
- reg add "HKLM\SYSTEM\ControlSet001\Services\lmhosts" /f /v "Start" /t REG_DWORD /d 0x2
- reg delete "HKLM\SYSTEM\ControlSet001\Services\NetBT\Parameters" /f /v "SMBDeviceEnabled"
- reg delete "HKLM\SYSTEM\ControlSet001\Services\LanmanServer\Parameters" /f /v "SMB1"
- reg delete "HKLM\SYSTEM\ControlSet001\Services\LanmanServer\Parameters" /f /v "SMB2"
- reg add "HKLM\SYSTEM\ControlSet001\Services\netprofm" /f /v "Start" /t REG_DWORD /d 0x2
- reg add "HKLM\SYSTEM\ControlSet001\Services\fdPHost" /f /v "Start" /t REG_DWORD /d 0x2
- reg add "HKLM\SYSTEM\ControlSet001\Services\FDResPub" /f /v "Start" /t REG_DWORD /d 0x2
- reg add "HKLM\SYSTEM\ControlSet001\Services\WMPNetworkSvc" /f /v "Start" /t REG_DWORD /d 0x2
-
- rem 添加防火墙规则
- >nul 2>&1 netsh advfirewall firewall set rule group=\"网络发现\" new enable=Yes
- >nul 2>&1 netsh advfirewall firewall set rule group=\"文件和打印机共享\" new enable=Yes
- >nul 2>&1 net config server /hidden:no
- rem 修改本地安全策略中的:拒绝从网络访问计算机,将里面的Guest删除
- set "_tf=%temp%\%~n0.inf"
- >"%_tf%" (echo.[Unicode]
- echo.Unicode=yes
- echo.[Version]
- echo.signature="$CHICAGO$"
- echo.Revision=1
- echo.[Privilege Rights]
- echo.sedenynetworklogonright =
- echo.senetworklogonright = Everyone,Administrators,Users,Power Users,Backup Operators,guest)
- if not exist "%_tf%" goto:eof
- >nul 2>&1 secedit /configure /db "%_tf:inf=sdb%" /cfg "%_tf%" /log "%_tf:inf=log%" /quiet
- >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 |