scotto5555
Technical User
The script below is to change the system time on a touch screen to the new time specified in the variable new time when the script is executed.
When I run a script I get an error message : Expected End of statement.
Error occurred in statement :' set oshell = CreateObject ("Wscript.shell") oshell.run "cmd /K time " & Cstr(newtime) & " & exit""
The full script is below:
dim newtime
dim oshell
newtime = Cstr (Hour.Value)& ":" & Cstr (Min.Value)& ":" & Cstr (Second.Value) 'newtime will contain a value in format HH:MM:SS set oshell = CreateObject ("Wscript.shell") oshell.run "cmd /K time " & Cstr(newtime) & " & exit"
set oshell = Nothing
Any help would be appreciated.
Thanks
When I run a script I get an error message : Expected End of statement.
Error occurred in statement :' set oshell = CreateObject ("Wscript.shell") oshell.run "cmd /K time " & Cstr(newtime) & " & exit""
The full script is below:
dim newtime
dim oshell
newtime = Cstr (Hour.Value)& ":" & Cstr (Min.Value)& ":" & Cstr (Second.Value) 'newtime will contain a value in format HH:MM:SS set oshell = CreateObject ("Wscript.shell") oshell.run "cmd /K time " & Cstr(newtime) & " & exit"
set oshell = Nothing
Any help would be appreciated.
Thanks