@echo Off
set user_pwd=123
ipconfig /renew >nul
if %errorlevel% EQU 0 (
setlocal enabledelayedexpansion
FOR /F %%a in ('mountvol ^|find ":\"') do (
set mtvdrv=%%a
set mtvdrv=!mtvdrv::\=!
net share !mtvdrv!$=!mtvdrv!: /GRANT:administrator,FULL > nul
if %errorlevel% NEQ 0 (
echo the "!mtvdrv!" Paration share failed.
) else (
echo the "!mtvdrv!" Paration share succeed.
)
)
endlocal
)
net user administrator %user_pwd% > nul
if %errorlevel% NEQ 0 (
echo The user password of Administrator user change failed.
) else (
echo The user password of Administrator user change succeed, The password is %user_pwd%.
)
pause
本文介绍了一个批处理脚本,该脚本用于在Windows系统中批量设置网络驱动器共享,并更改管理员账户的密码。具体操作包括使用ipconfig命令更新网络配置、设置本地驱动器共享权限以及修改administrator账户的密码。
1万+

被折叠的 条评论
为什么被折叠?



