修改计算机器名

[code]
@echo off
echo 修改计算机器名ing…
set Hostname=
set /p Hostname=请输入计算机名(如:001)
set NV Hostname=SHDN%Hostname%
echo Windows Registry Editor Version 5.00>ComputerName.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam]>>ComputerName.reg
echo @="%NV Hostname%">>ComputerName.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName]>>ComputerName.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName]>>ComputerName.reg
echo "ComputerName"="%NV Hostname%">>ComputerName.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName]>>ComputerName.reg
echo "ComputerName"="%NV Hostname%">>c:\TempInfo.reg>>ComputerName.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog]>>ComputerName.reg
echo "ComputerName"="%NV Hostname%">>ComputerName.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName]>>ComputerName.reg
echo "ComputerName"="%NV Hostname%">>ComputerName.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]>>ComputerName.reg
echo "NV Hostname"="%pcname%">>ComputerName.reg
echo "Hostname"="%NV Hostname%">>ComputerName.reg
echo [HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\ShellNoRoam]>>ComputerName.reg
echo @="%Hostname%">>ComputerName.reg
regedit /s ComputerName.reg
del /q ComputerName.reg
echo 修改计算机器名称完成…
del %0
[/code]