[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 778
  • Last Modified:

Set Time in Login Script

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
Randyp53
Asked:
Randyp53
1 Solution
 
sirbountyCommented:
Dim objShell:Set objShell=CreateObject("Wscript.Shell")
objShell.Run "net time \\servername /set"
0
 
KCTSCommented:
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
 
vnicolaeCommented:
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
 
ShineOnCommented:
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

Free tool for managing users' photos in Office 365

Easily upload multiple users’ photos to Office 365. Manage them with an intuitive GUI and use handy built-in cropping and resizing options. Link photos with users based on Azure AD attributes. Free tool!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now