How can I enumerate/list all installed applications in Windows XP?

后端 未结 7 1283
囚心锁ツ
囚心锁ツ 2020-12-03 00:21

When I say \"installed application\", I basically mean any application visible in [Control Panel]->[Add/Remove Programs].

I would prefer to do it in Python, but C o

7条回答
  •  不知归路
    2020-12-03 00:43

    The best registry-based implementation that I have seen is the one written by Chris Wright (chris128) posted at http://www.vbforums.com/showthread.php?t=598355. It uses multiple registry keys and is a lot more complex than any of the answers currently posted here. It seems to produce identical results to the Add/Remove Programs app, and like the ARP app it also provides an option to include updates.

    Although it's implemented in VB.NET, it should be easy to convert to other .NET languages like C# or IronPython. I imagine that converting to IronPython first should make it fairly easy to port to regular Python if that's what you want, but I only converted it to C# myself and then cleaned up the code a bit.

    Only one small bug to point out: GetUserInstallerKeyPrograms() doesn't add the version for user programs to the list, even though it extracts it. This is easy to fix though.

提交回复
热议问题