I want to use Windows Scripting Host to automate my windows instalation and I want from it to change the hour to 24h and the date to YYYY-MM-DD.
Is it possible?
I want to use Windows Scripting Host to automate my windows instalation and I want from it to change the hour to 24h and the date to YYYY-MM-DD.
Is it possible?
Yes, it's possible.
If you make a change to those settings, you will see that they are stored within HKCU\Control Panel\International. Since it's a user setting, you could set up a startup script to apply the change to each user or you could change the new user template, which is C:\Users\Default\NTUSER.DAT. You will need to load that hive, make the changes, and then unload it.
You can script that in VBScript, JScript, or PowerShell. I'm sure you can find examples if you search or ask an AI chat system.
Please note that .Default profile is a misnomer. That's actually the System account profile. You can also update that profile if you like, but it won't make any difference to new or existing users. There may be some benefit to updating the System profile for any scripts that you may run via that account (typically via a scheduled task) that depend on the date and time formats. However, such scripts, if written properly, wouldn't be affected by those settings anyhow.
You can find the information about the user profile template repeated at the following link (just note that its reference to C:\Documents and Settings should be C:\Users for Windows Vista and beyond.
https://devblogs.microsoft.com/oldnewthing/20070302-00/?p=27783