Avatar of moresoft123
moresoft123Flag for Ireland

asked on 

trying to set time format via .ADM template

Hi,

A client of ours is using software that requires the time format to be "hh:mm:ss" (so no ":tt").
It's windows server 2003 R2 environment, PCs running XP
I wanted to create a group policy that enforces this but from what i see there is no GPO for this.
I've tried implementing the following adm:

----- time.adm -----
class user
category "regional settings"
policy "Change time format"
keyname "control panel\international"
part "change to:" edittext
valuename "sTimeFormat"
default "HH:mm:ss"
end part
end policy
end category

----- time.adm -----

but it gives an error when i try to link it. The error is:

Error 51: Unexpected Keyword
Found:-
Expected: CLASS, CATEGORY,[strings]

when checking the registry, the reg key shows as sTimeFormat,
and it's stored at HKCU\Control Panel\International.

I couldn't find an example of exactly what I was looking for online,
so what I've written here is based on a similar script for setting date format.

Would anybody know the correct script for this?

Thanks
Microsoft Server OSActive DirectoryWindows Server 2003

Avatar of undefined
Last Comment
moresoft123
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image


Nothing wrong with that, can you attach the template as a file?

Chris
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of moresoft123
moresoft123
Flag of Ireland image

ASKER

thanks for the response.
Chris-Dent - i've attached the file. I changed the extension from adm to txt so as to be able to attach it.
oBdA - I removed -time.adm- and it now gives the error:
"error 51: unexpected keyword
Found: valuename
Expected: CHECKBOX, TEXT, EDITTEXT...
The file cannot be loaded"
so I've put it back. I unchecked the box that says "Only show policy settings that can be fully managed" but it made no difference, I still got the same error.

Thanks
My-ADM-template.txt
SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of oBdA
oBdA

Trust me - these are cut lines, the GP editor doesn't know anything about them.
If you like them, put a ";" in front of them, then they're remarks and the GP editor won't care about them.
The current error is coming because the value name has to be defined outside the "edittext":
The file looks and loads just fine here:
class user 
category "regional settings" 
  policy "Change time format" 
    keyname "control panel\international" 
    part "change to:" edittext 
      valuename "sTimeFormat" 
      default "HH:mm:ss" 
    end part 
  end policy 
end category

Open in new window

Avatar of oBdA
oBdA

Drop the line about "the current error", that wasn't correct...
Avatar of moresoft123
moresoft123
Flag of Ireland image

ASKER

spot on, that did it. Thanks the pair of you - I've split the points, oBdA spotted my mistake straight away, but Chris also went off and tested it, so thanks to you both.
Windows Server 2003
Windows Server 2003

Windows Server 2003 was based on Windows XP and was released in four editions: Web, Standard, Enterprise and Datacenter. It also had derivative versions for clusters, storage and Microsoft’s Small Business Server. Important upgrades included integrating Internet Information Services (IIS), improvements to Active Directory (AD) and Group Policy (GP), and the migration to Automated System Recovery (ASR).

129K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo