Jump to content

System Account locals


Recommended Posts

Guest JanLisbjerg
Posted

Hi

 

I have a server (Windows 2003) where a scriot is running as the System

Account.

The script uses some date information.

This date information is retrieved as: mm/dd/yyyy (Looks like the US date

format)

 

I would like to have it as: dd/mm/yyyy (The UK date format)

 

How can I change the regional options on the System Account ?

I tried changing the administrators regional options, but that did not help

because the script is running as System Account

  • Replies 1
  • Created
  • Last Reply

Popular Days

Guest Pegasus \(MVP\)
Posted

Re: System Account locals

 

 

"JanLisbjerg" <JanLisbjerg@discussions.microsoft.com> wrote in message

news:36D099A4-D707-4464-9D67-54AE802E656C@microsoft.com...

> Hi

>

> I have a server (Windows 2003) where a scriot is running as the System

> Account.

> The script uses some date information.

> This date information is retrieved as: mm/dd/yyyy (Looks like the US date

> format)

>

> I would like to have it as: dd/mm/yyyy (The UK date format)

>

> How can I change the regional options on the System Account ?

> I tried changing the administrators regional options, but that did not

> help

> because the script is running as System Account

 

Where do you obtain the date information from? Are you

using the %date% variable? Or a system call?

 

Here are a couple of ways to make your scripts robust and

independent of regional settings:

- Use now.exe in order to obtain the date details. This tool

is included with the Windows Resource Kit.

- Use a VB Script solution such as this one:

D = 1000000 * day(now) + 10000 * month(now) + year(now)

wscript.echo Left(D,2) & "/" & Mid(D,3,2) & "/" & Right(D,4)


×
×
  • Create New...