用记事本新建文档,把下面的内容复制进去,把第一行引号部分的1234改成你想要的数字,如ComputerName = 88,保存为.vbs(如88.vbs),双击文件执行后提示完成,就OK了!
'=================================================
ComputerName = 1234
Set WshShell = CreateObject(Wscript.Shell)
Set Fso = CreateObject(SCripting.FileSystemObject)
WshShell.RegWrite HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName, ComputerName ,REG_SZ
WshShell.RegWrite HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NV Hostname, ComputerName ,REG_SZ
WshShell.RegWrite HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Hostname, ComputerName ,REG_SZ
Set WshShell=Nothing
Set Fso=Nothing
MsgBox 机器名修改完成!,64,提示
'=================================================
取消
评论