string strCmdText;
strCmdText =
"useraccount where name='" + 旧密码 +
"' rename " +
新密码;
try
{
System.Diagnostics.Process.Start("wmic.exe", strCmdText);
}
catch (System.Exception ex)
{
MessageBox.Show("修改失败,原因:" + ex.Message,
"错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
转载于:https://www.cnblogs.com/xxxteam/p/3316533.html
转载请注明原文地址: https://win8.8miu.com/read-1557013.html