Here's one that's stumping me.

Does anyone know where in the registry the two-digit year regional setting is located? I am working on a system that refuses to apply this setting server wide, making it so we have to run windows services under specific log on accounts instead of a local system account (and I know the registry is usually a sound way to fix this)

You can change the setting for the default profile (which gets used whenever a new profile is created) by navigating to

HKEY_USERS\Default User\Control Panel\International

and changing the values for

sShortDate
sLongDate

to whatever format you want. This, however, will not modify already existing profiles. You could just iterate through all the user profiles under

HKEY_USERS\

and modify them the same way. You could even do this by a registry merge. For example, if I wanted to modify the settings on my laptop for .DEFAULT and two other existing profiles I would run the following file named

ChangeDefaultDate.reg


REGEDIT4

[HKEY_USERS\.DEFAULT\Control Panel\International]
"sLongDate"="dddd, MMMM dd, yyyy"
"sShortDate"="yyyy/MM/dd"

[HKEY_USERS\S-1-5-18\Control Panel\International]
"sLongDate"="dddd, MMMM dd, yyyy"
"sShortDate"="yyyy/MM/dd"

[HKEY_USERS\S-1-5-19\Control Panel\International]
"sLongDate"="dddd, MMMM dd, yyyy"
"sShortDate"="yyyy/MM/dd"

Oh I know where those are located, trust me that's the first place I looked, but that's only good for a the date time format (I've had to fix those multiple times).

But I am looking for the two-digit year value. It pretty much states that when you see a number like '99' for a year, that's 1999 or 2099, ext. By default it's 1930 to 2029. I have seen this number present on Windows Server 2008, Windows 7, and Windows 8.

This number has to be stored somewhere, but I can't find it. It's annoying because I had a windows service (as well an IIS one) running under a local system login. I had to run it under a specific user account where I changed this value.

That's why I am trying to figure out how to change this value so I don't have to switch over my servies to run under a specific account to make it recognized a two digit year correctly

I can't help you with that one. This may make me sound like an a$$ but why is anyone still using two digit year values?

Ever heard of the HIBC Barcode? There are multiple ways it can store a Time Stamp in the code. Some of these formats only use a two-digit year. I believe GS1 does this as well, I can't remember for sure though.

Plus there are companies that do it this way in their warehouses

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.