在Windows命令提示符下查找安装的应用程序的date和时间

我想知道在安装特定程序时使用Windows脚本,包括date和时间。 我能find安装的date,但不是时间。

这告诉我如何finddate: http : //ccm.net/faq/10354-determine-the-installation-date-of-software-under-windows

链接中引用的记录也可以用WMIC命令读取:

 wmic product where "Caption like '%node%'" get InstallDate /fomat:value 

在这里你可以用足够的字符串来改变节点。这里可以从批处理文件中使用这个变量:

 @echo off setlocal enableDelayedExpansion set "productname=node" for /f "tokens=* delims=" %%# in ('wmic product where "Caption like '%%!productname!%%'" get InstallDate /format:value') do ( for /f "tokens=* delims=*" %%$ in ("%%#") do set "%%$" ) echo %installdate% 

但时间不能接收这种方式。只有日期。要得到时间,你将不得不查询已安装的文件(与wmic prodict你也可以得到安装目录)

如果你想手动检查日期和时间,你可以打开安装目录,然后右键单击exe文件属性,并在常规选项卡下看到“访问”。 你可以看到安装日期和时间。 可能有一些脚本可以做到这一点,但我不知道