wmic failure with concurrent calls on XP and Server 2003

社会主义新天地 提交于 2019-12-02 09:47:48

I've never heard of the issue you are reporting.

You could try getTimeStamp.bat - a hybrid JScript/batch utility that provides robust, locale independent, date and time computation and formatting. The utility is pure script using native Windows functionality.

Assuming you have getTimeStamp.bat in your current directory, or better yet, somewhere in your path, then the following will create a variable named currentTimeStamp containing the current date and time in WMIC format.

call getTimeStamp -f {yyyy}{mm}{dd}{hh}{nn}{ss}.{fff}000{zzzz} -r currentTimeStamp

There are a great many formats available, as well as the ability to apply date and time offsets, etc. Full documentation is embedded within the script.

This works, there is no need for the type nul pipe.

wmic os get localdatetime | findstr .
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!