启动后,我想创建一个批处理文件,要求用户更改当前管理员密码。
Step 1: User logins
Step 2: Batch file runs displaying message "Please change Administrator password"
Step 3: user types in new password
Step 4: sets new password for Administrator account
Step 5: deletes batch file
除非用户更改密码,否则不得执行第5步。我知道如何设置任务计划以使其运行,只是不确定.bat文件中的代码是什么。
答案 0 :(得分:0)
@echo off
Set "password123="
echo "Please change Administrator password"
set /P password123=Enter your new password:
If Not Defined password123 goto :exit
net user administrator %password123%
del "%~f0"
:exit
exit