Sponge Belly wrote:Thanks for the pointers, npocmaka.
But this thread on a Russian forum proved to be instructive. Retouching the script I found there, I ended up with:
Code: Select all
FileSystemObject'^).GetStandardStream(1^).Write(new String(new ^
ConnectServer('.','root\\cimv2'^).ExecQuery('Select LocalDateTime ^
from Win32_OperatingSystem where Primary=True'^)^).item(^).^
for /f %%t in ('mshta "%js%"') do echo(WMI LocalDateTime: %%t
Long-winded, but it works! And it should work for everyone, even any poor Windows XP Home bunnies still left out there.