Ⅰ 用批处理登录同局域网共享文件夹的编写
1.打开“计算机”窗口,点击菜单栏底部的“组织”下拉列表,选择“文件夹和搜索选项”即可打开。
Ⅱ 开启局域网共享批处理命令
@echo off
@echo.
@echo.
@set/p var=开启或关闭局域网共享[y/n] :
@if %var%==y goto a
@if %var%==n goto b
exit
:a
@reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v restrictanonymous /t reg_dword /d 0 /f
@sc config lanmanserver start= auto 1>nul 2>nul
@sc config LmHosts start= auto 1>nul 2>nul
@sc config lanmanworkstation start= auto 1>nul 2>nul
@net start lanmanserver 1>nul 2>nul
@net start LmHosts 1>nul 2>nul
@net start lanmanworkstation 1>nul 2>nul
@echo.
@ipconfig|findstr IP
pause>nul&exit
:b
@sc config lanmanserver start= disabled 1>nul 2>nul
@sc config LmHosts start= disabled 1>nul 2>nul
@sc config lanmanworkstation start= disabled 1>nul 2>nul
@net stop lanmanserver 1>nul 2>nul
@net stop LmHosts 1>nul 2>nul
@net stop lanmanworkstation 1>nul 2>nul
exit
Ⅲ 请问怎么用批处理(bat)修改服务,策略组和共享权限
@echo off
sc config lanmanserver start= auto
net start server
rem 不允许SAM 帐户的匿名枚举, 设为"停用"
reg add HKLM\System\CurrentControlSet\Control\Lsa /v RestrictAnonymousSAM /t REG_DWORD /d 0 /f
rem 网络访问:不允许 SAM 帐户和共享的匿名枚举,设为"停用"
reg add HKLM\System\CurrentControlSet\Control\Lsa /v RestrictAnonymous /t REG_DWORD /d 0 /f
rem 本地帐户的共享和安全模型,属性改为"经典 - 本地用户以自己的身份验证"
reg add HKLM\System\CurrentControlSet\Control\Lsa /v ForceGuest /t REG_DWORD /d 0 /f
rem 账户:使用空白密码的本地账户只允许进行控制台登录,设为“停用"
reg add HKLM\System\CurrentControlSet\Control\Lsa /v LimitBlankPasswordUse /t REG_DWORD /d 0 /f
net user guest /active:yes
net stop sharedaccess
net share f=f:
cacls d:\ /t /e /c /r everyone
cacls f:\ /t /e /c /g guest:f
cacls d:\ /t /e /c /g administrator:f
----------------------------------------------------
ok,,就是第5.将'文件夹选项'里的"使用简单的文件共享"关闭,这个不会