所以我试图让我的技术人员的生活更轻松,因为他们有时会忘记在新格式化的电脑上设置某些东西。
我设法设置了它的电源设置部分,但我在使用小数符号和日期格式时遇到了问题。我完全导出了 HKEY_USERS.DEFAULT\Control Panel\International,就像我想要的那样,但我无法将它放入当前的 bat 文件中,因为我真的不想让它们运行超过 1 个文件。所以我认为如果可以将注册表值放在批处理文件中并作为单独的外壳启动它可能会很棒?我没有任何建议会很棒。这是我到目前为止所拥有的。
蝙蝠档案:
FOR /F "tokens=3 delims= " %%G IN ('wmic os get Caption /value') DO SET _version=%%G
echo %_version%
IF %_version%==XP (
POWERCFG /setactive "always on"
POWERCFG /Change "always on" /monitor-timeout-ac 0
POWERCFG /Change "always on" /monitor-timeout-dc 0
POWERCFG /Change "always on" /disk-timeout-ac 0
POWERCFG /Change "always on" /disk-timeout-dc 0
POWERCFG /Change "always on" /standby-timeout-ac 0
POWERCFG /Change "always on" /standby-timeout-dc 0
POWERCFG /Change "always on" /hibernate-timeout-ac 0
POWERCFG /Change "always on" /hibernate-timeout-dc 0
) ELSE (
POWERCFG /Change /monitor-timeout-ac 0
POWERCFG /Change /monitor-timeout-dc 0
POWERCFG /Change /disk-timeout-ac 0
POWERCFG /Change /disk-timeout-dc 0
POWERCFG /Change /standby-timeout-ac 0
POWERCFG /Change /standby-timeout-dc 0
POWERCFG /Change /hibernate-timeout-ac 0
POWERCFG /Change /hibernate-timeout-dc 0
)
pause
我想要在 bat 文件中的注册表值:
[HKEY_USERS\.DEFAULT\Control Panel\International]
"Locale"="00001c09"
"LocaleName"="en-ZA"
"s1159"="AM"
"s2359"="PM"
"sCountry"="South Africa"
"sCurrency"="R"
"sDate"="/"
"sDecimal"="."
"sGrouping"="3;0"
"sLanguage"="ENS"
"sList"="."
"sLongDate"="dd MMMM yyyy"
"sMonDecimalSep"="."
"sMonGrouping"="3;0"
"sMonThousandSep"=" "
"sNativeDigits"="0123456789"
"sNegativeSign"="-"
"sPositiveSign"=""
"sShortDate"="dd/mm/yyyy"
"sThousand"=" "
"sTime"=":"
"sTimeFormat"="hh:mm:ss tt"
"sShortTime"="hh:mm tt"
"sYearMonth"="MMMM yyyy"
"iCalendarType"="1"
"iCountry"="27"
"iCurrDigits"="2"
"iCurrency"="2"
"iDate"="2"
"iDigits"="2"
"NumShape"="1"
"iFirstDayOfWeek"="6"
"iFirstWeekOfYear"="0"
"iLZero"="1"
"iMeasure"="0"
"iNegCurr"="2"
"iNegNumber"="1"
"iPaperSize"="9"
"iTime"="0"
"iTimePrefix"="0"
"iTLZero"="1"