Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 674
  • Last Modified:

Military Time .adm file for group policy. Is there anyway to apply it to machine rather than user?

I found the following adm file on ee;
CLASS USER
CATEGORY "Time settings"
  POLICY "Use military time"
  KEYNAME "Control Panel\International"
  ACTIONLISTON
    VALUENAME "iTime"
    VALUE "1"
    VALUENAME "iTLZero"
    VALUE "1"
    VALUENAME "s1159"
    VALUE ""
    VALUENAME "s2359"
    VALUE ""
    VALUENAME "sTime"
    VALUE ":"
    VALUENAME "sTimeFormat"
    VALUE "HH:mm:ss"
    VALUENAME "iTimePrefix"
    VALUE "0"
  END ACTIONLISTON
  ACTIONLISTOFF
    VALUENAME "iTime"
    VALUE "0"
    VALUENAME "iTLZero"
    VALUE "0"
    VALUENAME "s1159"
    VALUE "am"
    VALUENAME "s2359"
    VALUE "pm"
    VALUENAME "sTime"
    VALUE ":"
    VALUENAME "sTimeFormat"
    VALUE "h:mm"
    VALUENAME "iTimePrefix"
    VALUE "0"
  END ACTIONLISTOFF
  END POLICY
END CATEGORY

Which works well for users but I need to apply to computers. I tried changing the "CLASS USER" to CLASS MACHINE but I get a Event ID 1096 on the client workstation "windows cannot access the registry policy file, \\domain\sysvol\domain\policies\{GUID}\Machine\registry.pol (the parameter is incorrect.)"

Thanks in advance
0
sweetaz
Asked:
sweetaz
1 Solution
 
Michael PfisterCommented:
The time settings are user specific, therefore they cannot be set on a machine level. Changing the CLASS won't work.
Why can't you use the policy applied to all users? Probably you don't want all computers set up in that way ...

Depending on what you have and want to achive you can either 1) import these default settings on any number of computers into the default registry hive or 2) put a registry hack into the login script.

1) won't work if you have roaming users
2) obviousliy can't work if you do not have a logon script

How to do it:
1) Make sure hidden files and directories are visible in explorer. Start regedit (Win XP) or regedt32 (Win 2000). Click on HKEY_LOCAL_MACHINE, then File -> load hive. Navigate to \Documents and Settings\Default User and click NTUSER.DAT. Give the hive a name like TEMP. Navigate to
HKEY_LOCAL_MACHINE\TEMP\Control Panel\International and make your settings. IMPORTANT! When finished, klick on HKEY_LOCAL_MACHINE\TEMP and select Unload hive from the File menu.

2) Add the following lines to your logon script
Create a reg file with your settings and export it to miltime.reg like this one:
------- snip ------------
REGEDIT4

[HKEY_CURRENT_USER\Control Panel\International]
"iTime"="1"
"iTLZero"="1"
"s1159"=""
"s2359"=""
"sTime"=":"
"sTimeFormat"="HH:mm:ss"
"iTimePrefix"="0"
------- snip ------------
Put the reg file into your NETLOGON directory.

Add this line to your logon script

If %COMPUTERNAME% == <computer name goes here> regedit /s %0\..\miltime.reg


Hope it helps,

Michael
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now