本帖最后由 pcl_test 于 2016-11-19 22:49 编辑
例如代码如下:- ECHO 请输入计算机名或直接回车使用预设计算机名:
- set /p id=
- reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" /v "ComputerName" /d "%id%" /f >nul 2>nul
- reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v "ComputerName" /d "%id%" /f >nul 2>nul
- reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v "NV Hostname" /d "%id%" /f >nul 2>nul
- reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters" /v "Hostname" /d "%id%" /f >nul 2>nul
- reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AltDefaultDomainName" /d "%id%" /f >nul 2>nul
- reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SchedulingAgent" /v "OldName" /f >nul 2>nul
复制代码 请问有什么办法让%id%的值统一大小写(例如我输入ChInA,批处理输出结果CHINA或者china)? |