Solved

Set Time in Login Script

Posted on 2007-03-29
4
758 Views
Last Modified: 2008-05-30
I'm using a visual basic script to map network drives during login.  How can I also set time on the client machines in the login, such as you can do with Netware login scripts?
0
Comment
Question by:Randyp53
4 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18817467
Dim objShell:Set objShell=CreateObject("Wscript.Shell")
objShell.Run "net time \\servername /set"
0
 
LVL 70

Expert Comment

by:KCTS
ID: 18817704
If your clients are on a domain they will automatically sync their time with the PDC Emulator on the Domain Controller so this will be unnecessary
0
 
LVL 4

Expert Comment

by:vnicolae
ID: 18818361
Both answers are correct. KCTS' answer only apply in an Windows 2000/2003 domain with a Windows 2000/XP client.

If the domain is NT4, you'll have to use the logon script (see sirbounty's answer). However, the user that logs on will have to be a local administrator.
0
 
LVL 35

Accepted Solution

by:
ShineOn earned 250 total points
ID: 18818951
If you've got an AD domain, the third way is to force the time synchronization using Group Policy...  That way, nothing has to be "executed" as a script during login - it's just a GPO update.

That group policy object can point to specific DC's as time sources or can point to a non-Windows time source or whatever else you want it to do.  You have to understand how the windows time service works, though.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Resolve DNS query failed errors for Exchange
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now