添加/删除程序在哪里将“安装在开”的数据拉出柱? [英] Where does Add/Remove programs pull data for the "Installed On" column?

查看:250
本文介绍了添加/删除程序在哪里将“安装在开”的数据拉出柱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VBScript复制Windows 7/8添加删除程序小程序。我已经得到了包含所有正确条目的脚本,但是我无法将其包含在Windows显示的所有正确的附加信息中。

I'm working on replicating the Windows 7/8 add remove programs applet with VBScript. I've gotten the script to include all the correct entries, but I have not been able to get it to include all the correct additional information Windows displays.

作为示例:Windows显示带有日期的已安装列。在某些情况下,它会从相关的注册表项中获取这些密码:

As an example: Windows displays the "Installed On" column with a date. In some cases it gets these from the relevant registry keys like:

HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\InstallDate
HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\InstallDate
HKUS\USER - SID\Software\Microsoft\Windows\CurrentVersion\Uninstall\InstallDate

很少的键实际上具有InstallDate值,Windows总是得到这个列填充。我设法从WMI中获取大部分缺失的日期:

Very few keys actually have the InstallDate value and Windows always get this column filled. I've managed to grab the majority of the missing dates from WMI:

 ("SELECT * FROM Win32_Product Where Description = " & "'" & strName & "'" & "")
for each objSoftware in colSoftware
Date = objSoftware.InstallDate

这只给出了安装MSI的应用程序的日期。

This only gives the dates from MSI installed applications.

我在想,也许Windows猜到在程序文件/ ProgramData文件日期,但我已经尝试手动更改它们,并没有反映在添加/删除。我想知道Windows如何拉这个日期。我注意到CCleaner可以重现添加/删除没有错误,所以这个信息可以在某个地方使用。我已经用尽了自己寻找它。

I was thinking maybe Windows "guessed" the dates based on Program Files/ProgramData file dates, but I've tried manually changing them and it isn't reflected in Add/Remove. I'm trying to figure out how Windows pulls this date. I've noticed CCleaner can reproduce add/remove without error, so this information is available somewhere. I've just exhausted myself looking for it.

推荐答案

经过很多的搞乱,我确定Windows添加/删除程序从至少三个潜在位置获取已安装日期:

After a lot of messing around I determined that the Windows Add/Remove programs gets the "Installed On" date from at least three potential locations:


  • 对于安装MSI的应用程序,它从WIN32_Product到目前为止最常见的方式)

  • For MSI installed applications it gets the date from WIN32_Product (By far the most common way)

对于非MSI应用程序,它会查找相应注册表中的InstallDate值卸载密钥(示例:HKLM\SOFTWARE \Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome)

For non-MSI applications it looks in for the InstallDate value in the corresponding registry Uninstall Key (Example: HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome)

对于没有InstallDate的非MSI应用程序, Windows查看卸载密钥的最后一个日期,并将该日期用于已安装。

For non-MSI applications that do not have the InstallDate, Windows looks to see the last date that the Uninstall key was written to and uses that date for "Installed On".

这是最后一个让我陷入困境的方法。这意味着任何时候都会更新缺少InstallDate值的非MSI程序,并且卸载密钥中的版本号被修改,你会注意到已安装的日期也被更新,并且给出该程序的外观刚刚安装。

It was this last method that had me stumped for so long. This means that any time a non-MSI program that is missing the InstallDate value is updated, and the version number in the Uninstall Key is modified, you'll notice the "Installed On" date also updates and gives the appearance of that program have just been installed.

示例:HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Flash Player Plugin

An Example: HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Flash Player Plugin

如果您的Flash Player插件安装不是基于MSI的,那么您可以进入此密钥并将版本从11.8.800.94修改为11.8.800.93,并且您的添加/删除将更改安装在日期到今天。

If your Flash Player Plugin install wasn't MSI based, then you can go into this key and modify the version from 11.8.800.94 to 11.8.800.93 and your Add/Remove will change the "Install On" date to today.

这篇关于添加/删除程序在哪里将“安装在开”的数据拉出柱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆