Skip to main content

Batch

cmdfor
chcp修改 code Page
:: 设置代码页为 UTF-8 - Windows 7+
@chcp 65001>nul

:: 实现一个 CMDRC, 每次启动
reg add "hklm\software\Microsoft\Command Processor" /f /v AutoRun /d "C:\cmdrc.cmd" > NUL
:: 还算简单的一个提示符
prompt $P$_$$$S

:: 后台运行 相当于linux下的 xxx &
START /B xxx.exe

:: SC 服务操作 http://support.microsoft.com/kb/251192
sc create svnserve binpath= "\"C:\Program Files\CollabNet Subversion Server\svnserve.exe\" --service -r \"C:\my repositories\" " displayname= "Subversion Server" depend= Tcpip start= auto

sc create asperacentral binPath= "C:\Program Files\Aspera\Enterprise Server\bin\Debug\asperacentral.exe" DisplayName= "Aspera Central" start= auto

:: CMD 续行符号为 ^ 相当于 linux的 \

:: 操作菜单中的最佳列表
:: %appdata%\Microsoft\Windows\Recent

:: 跳转菜单中的最近列表
:: %appdata%\microsoft\windows\recent\automaticdestinations
cpcountry/region/language
437United States
850Multilingual (Latin I)
852Slavic (Latin II)
855Cyrillic (Russian)
857Turkish
860Portuguese
861Icelandic
863Canadian-French
865Nordic
866Russian
869Modern Greek
936Chinese
65001UTF-8
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\OEMCP
    • 可以修改默认的 code page
  • HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\Autorun
    • 可以设置自动运行的脚本