Announcement

Collapse
No announcement yet.

Change workstation time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • pkducky
    replied
    Re: Change workstation time

    Thanks for the info, but now I have to confess my ignorance. How do I run this? I take it I do it within Hyena, but after poking around a bit I feel myself running in circles.

    Thanks again for the assist.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Re: Change workstation time

    This little snippet will set the remote system's time to that of the IP address you specify.


    ' ---------- start here ---------
    On Error Resume Next 'turn off error checking
    Dim wmi, process, startupInfo, cmd
    Dim timeserver : timeserver = "1.2.3.4"
    'Get the WMI reference
    Set wmi = getobject("winmgmts:{(SystemTime)}!//" & sTarget)

    Set process = wmi.get("win32_process")

    Set startupInfo = wmi.get("win32_processstartup")
    'set additional parameters
    startupInfo.showWindow = 0 '0=hidden 1=normal 7=minnoactivate
    'set the command to Execute
    cmd = "net time \" & timeserver & " /set /y"
    ' do it!
    process.create cmd,,startupInfo
    On Error Goto 0 'reset error checking
    ' --------- end here ---------

    Hope this helps!

    Joel

    Leave a comment:


  • pkducky
    started a topic Change workstation time

    Change workstation time

    In a Windows NT domain, other than logging on to the front end via VNC, is there anyway to change a WinXP or Win2K workstations time?
Working...
X