-------------------------------------------------------------------------- set obj = getobject( "winmgmts:\\.\root\cimv2" ) set list = obj.execquery( "select * from win32_computersystem" ) for each x in list x.rename( wscript.arguments.item( 0 ) ) next --------------------------------------------------------------------------
> cscript.exe //nologo computerrename.vbs xxx
D: scz@nsfocus
平常自然语言所说的计算机名非常不精确,下面精确地介绍一下与之相关的注册表项:
-------------------------------------------------------------------------- windows Registry Editor Version 5.00