Reputation: 3
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "cmd /k tzutil /l "
when running the first script it worked fine but when running the second script full command it does not so what is missing?
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "cmd /k tzutil /s "Israel Standard Time""
Upvotes: 0
Views: 199
Reputation: 10360
Remove the extra double quotes and try again:
objShell.Run "cmd /k tzutil /s Israel Standard Time"
Or, if you want to pass the time zone inside double quotes, you can try this:
objShell.Run "cmd /k tzutil /s ""Israel Standard Time"""
Or, you can just write,
objShell.Run "tzutil /s Israel Standard Time"
All these will let you change the current time zone to Israel's Time Zone.
Upvotes: 2