Modifying Regional Local Settings using regedit command

(imported topic written by luke.dewey91)

I have been trying to push out a Bigfix script to our network that will run a simple registry punch to modify multiple settings within

HKEY_CURRENT_USER\Control Panel\International.

The easiest way I thought about doing it was to run a dos command

dos regedit /s \server\share\file.reg.

The command seems to execute however it never completes successfully.

I looked at some articles about how to modify settings within the HKEY_CURRENT_USER branch but im not quite sure how to implement that script into the command above.

Could someone please assist

Thanks.

(imported comment written by BenKus)

Hi Luke,

Your command won’t work unless “share” is a “null session share” (http://support.bigfix.com/bes/misc/null_session_share.html).

Alternately, you can distribute your file with the software distribution wizard or registry wizard.

Ben

(imported comment written by luke.dewey91)

Hi Ben,

I tried both the registry and software deployment wizards and both didn’t work.

When the registry wizard completed…and all of my clients said fixed.

The registry setting that I was reporting on didn’t change indicating the registry punch didn’t work successfully.

The software deployment wizard … on all clients failed.

here is the script that I was reporting on

value “Locale” of key “Control Panel\International” of (key whose ((it = name of current user as lowercase OR it starts with name of current user as lowercase & “@” ) of (it as string as lowercase) of value “Logon User Name” of key “Software\Microsoft\Windows\CurrentVersion\Explorer” of it) of key “HKEY_USERS” of registry)

And here is the contents of the registry file that I have been trying to install

Windows Registry Editor Version 5.00

HKEY_CURRENT_USER\Control Panel\International

“iCountry”=“1”

“iCurrDigits”=“2”

“iCurrency”=“0”

“iDate”=“0”

“iDigits”=“2”

“iLZero”=“1”

“iMeasure”=“1”

“iNegCurr”=“0”

“iTime”=“0”

“iTLZero”=“0”

“Locale”=“00000409”

“s1159”=“AM”

“s2359”=“PM”

“sCountry”=“United States”

“sCurrency”="$"

“sDate”="/"

“sDecimal”="."

“sLanguage”=“ENU”

“sList”=","

“sLongDate”=“dddd, MMMM dd, yyyy”

“sShortDate”=“M/d/yyyy”

“sThousand”=","

“sTime”=":"

“sTimeFormat”=“h:mm:ss tt”

“iTimePrefix”=“0”

“sMonDecimalSep”="."

“sMonThousandSep”=","

“iNegNumber”=“1”

“sNativeDigits”=“0123456789”

“NumShape”=“1”

“iCalendarType”=“1”

“iFirstDayOfWeek”=“6”

“iFirstWeekOfYear”=“0”

“sGrouping”=“3;0”

“sMonGrouping”=“3;0”

“sPositiveSign”=""

“sNegativeSign”="-"

HKEY_CURRENT_USER\Control Panel\International\Geo

“Nation”=“39”

Do you have any other idea’s?

Thanks again for you help.

(imported comment written by BenKus)

Hi Luke,

The problem is that the BigFix Agent runs as the system account so the HKCU branch refers to the system user. You can try downloading and running the RunAsCurrentUser.exe in your BigFix action to run this registry command:

http://support.bigfix.com/cgi-bin/kbdirect.pl?id=392

Ben

(imported comment written by luke.dewey91)

Thanks Ben,

The report i created with your help worked pefectly.

Thank you very much