
修改桌面路徑的批處理代碼是否有問(wèn)題
nclick="copycode($('code0'));">復(fù)制代碼
- @echo off
- color a
- set /p name=請(qǐng)輸入計(jì)算機(jī)名稱:
- @ping 127.1 /n 1 >nul
- reg add HKEY_LOCAL_MACHINESystemCurrentControlSetControlComputerNameActiveComputerName /v ComputerName /t reg_sz /d %name% /f
- @ping 127.1 /n 1 >nul
- reg add HKEY_LOCAL_MACHINESystemCurrentControlSetServicesTcpipParameters /v NV Hostname /t reg_sz /d %name% /f
- @ping 127.1 /n 1 >nul
- reg add HKEY_LOCAL_MACHINESystemCurrentControlSetServicesTcpipParameters /v Hostname /t reg_sz /d %name% /f
- @ping 127.1 /n 1 >nul
- reg add HKEY_LOCAL_MACHINESystemCurrentControlSetControlComputerNameComputerName /v Computername /t reg_sz /d %name% /f
- @ping 127.1 /n 1 >nul
- reg add HKEY_LOCAL_MACHINESystemCurrentControlSetControlComputerNameActiveComputerName /v Computername /t reg_sz /d %name% /f
- cls
- @echo 正在修改桌面路徑到D盤:
- reg add HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders /v Desktop /t REG_SZ /d d:桌面 /f
- @ping 127.1 /n 1 >nul
- @echo 正在重啟:
- shutdown -r -t 0

