少年老成、须求重启

@echo off
set /p pcnanme=请输入Computer的名字:
reg add
HKEY_LOCAL_MACHINESYSTEMControlSet001ControlComputerNameComputerName
/v ComputerName
/t REG_SZ /d
%pcnanme% /f
eixt

急需重启Computer技艺卓有成效

 

二、无需重启

@echo off
set /p name=输入新的微微型机名称
wmic computersystem where “PrimaryOwnerName=’%username%'” call rename
%NAME%&exit
行使wmic改名不用重启

 

 

由此改良注册表改正主机名和专业组

@echo off
echo AppLife.Net
set /p name=请输您的微处理机名:
reg add
“HKEY_LOCAL_MACHINESystemCurrentControlSetControlComputerNameActiveComputerName”
/v ComputerName /t reg_sz /d %name% /f >nul 2>nul
reg add
“HKEY_LOCAL_MACHINESystemCurrentControlSetServicesTcpipParameters”
/v “NV Hostname” /t reg_sz /d %name% /f >nul 2>nul
reg add
“HKEY_LOCAL_MACHINESystemCurrentControlSetServicesTcpipParameters”
/v Hostname /t reg_sz /d %name% /f >nul 2>nul
echo.
echo 更正Computer名完成
echo.
echo AppLife.Net
set /p work1=请输入您的做事组名:
wmic computersystem where Name=”%COMPUTERNAME%” call
JoinDomainOrWorkgroup Name=”%work1%”
echo 改革职业组完成
pause>nul
echo.

 

无需重启

Author

发表评论

电子邮件地址不会被公开。 必填项已用*标注