本帖最后由 smss 于 2020-11-5 13:18 编辑
提供个思路使用SETRES得到屏幕分辨率
宽W除以2 减 批处理窗口宽除以2得到居中的X坐标
高H除以2 减 批处理窗口高除以2得到居中的Y坐标
代入注册表 需要转换一下- reg add "HKCU\Console" /f /v "CurrentPage" /t REG_DWORD /d 2
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "WindowPosition" /t REG_DWORD /d 13107500
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "CodePage" /t REG_DWORD /d 936
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "ScreenBufferSize" /t REG_DWORD /d 163840120
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "WindowSize" /t REG_DWORD /d 1638480
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "FontSize" /t REG_DWORD /d 1048584
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "FontFamily" /t REG_DWORD /d 54
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "FontWeight" /t REG_DWORD /d 400
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "FaceName" /t REG_SZ /d "新宋体"
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "HistoryBufferSize" /t REG_DWORD /d 999
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "NumberOfHistoryBuffers" /t REG_DWORD /d 5
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "CursorType" /t REG_DWORD /d 0
- reg add "HKCU\Console\%%SystemRoot%%_system32_cmd.exe" /f /v "InterceptCopyPaste" /t REG_DWORD /d 0
复制代码
|