KB-28809: Setting Windows’s clock via E3 scripts.

Question:

How can I set Windows’ clock via E3 scripts?

Solution:

To do so, use DATE and TIME commands via DOS command line. It can be inserted in a script inside E3, for example, in a button’s Click event.

Sub CommandButton1_Click()
    Set oShell = CreateObject("WSCript.shell")
    'Changes date 
    oShell.run "cmd /K DATE "&DD&"/"&MM&"/"&AAAA,0
    'Changes time
    oShell.run "cmd /K TIME "&HH&":"&mm&":"&ss,0
    Set oShell = Nothing
End Sub
Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *