- @echo off
- set /p name=请输您的计算机名:
- reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v ComputerName /t reg_sz /d %name% /f >nul 2>nul
- reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v "NV Hostname" /t reg_sz /d %name% /f >nul 2>nul
- reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v Hostname /t reg_sz /d %name% /f >nul 2>nul
- echo.
- echo 修改计算机名完毕
- echo.
- set /p work=请输入您的工作组名:
- wmic computersystem where Name="%COMPUTERNAME%" call JoinDomainOrWorkgroup Name="%work%"
- echo 修改工作组完毕
- pause>nul
- echo.
复制代码 计算机名修改OK,我第一次操作把工作组改成B也OK,但现在无论如何改工作组的时候都提示 "无可用范例" "修改工作组完毕" ,但右键电脑属性看工作组还是没改变.
请高手帮忙处理,谢谢! |