Solved

Set Time in Login Script

Posted on 2007-03-29
4
752 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

Join & Write a Comment

Resolve DNS query failed errors for Exchange
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

747 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

13 Experts available now in Live!

Get 1:1 Help Now