Home > Ask the Windows Experts > From the Archives: Terminal Services Questions & Answers > How do I change the time zone of a user's session and not the local machine?
Ask The Win IT Expert: Questions & Answers
EMAIL THIS

How do I change the time zone of a user's session and not the local machine?

Christa Anderson EXPERT RESPONSE FROM: Christa Anderson

Pose a Question
Other Win IT Categories
Meet all Win IT Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 17 October 2006
I'm in a situation where I need to set a user's time zone on a terminal server session. The trick is that the user is using such an old thin client, that the thin client does not have a local time zone to pass. I have created a script to change the time zone based on a membership of an Active Directory group. However, the script is changing the time zone of the terminal server itself instead of the user's terminal server session. I have included the script. Any suggestions on changing only the time zone of the user's session and not of the local machine?
Dim strHostName, strSearchFoR
Set objComputer = CreateObject("Shell.LocalMachine")
Set objShell = CreateObject("WScript.Shell")

strHostName = UCase(objComputer.MachineName) strSearchFor = UCase("Term")

If InStr(1, strHostName, strSearchFor) > 0 then
wscript.echo "Changing Time Zone to Arizona"
objShell.Run "CONTROL.EXE TIMEDATE.CPL,,/Z Us Mountain Standard Time"
End If


>
EXPERT RESPONSE

Unfortunately, I don't think you can do this the way you're doing it. The problem is, although there is a WMI object representing terminal server sessions, it does not include the time zone property. In short, we can't get to this information via VBScript and, as you saw, setting it on the terminal server changes it for everybody. You might try a product called Time Machine to see if this user-based time-setting tool can help you. I have not tried this tool, but it looks like it answers your question.


Sound Off! -   Be the first to post a message to Sound Off!


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT DownloadsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts