473,809 Members | 2,742 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

List of all installed applications (XP)?

Hi all,

I'm trying to generate a (exhaustive) list of all the applications that are
installed on a user's machine. I've written some code that reads the
registry ('App Paths'):

<code>
appKey = win32api.RegOpe nKeyEx(win32con .HKEY_LOCAL_MAC HINE,
'SOFTWARE\Micro soft\Windows\Cu rrentVersion\Ap p Paths', 0, win32con.KEY_RE AD)
sklist = win32api.RegEnu mKeyEx(appKey)

for skey in sklist:
print skey[0]

try:
wPath = win32api.RegQue ryValue(appKey, skey[0])
print ' ' + wPath
except pywintypes.erro r,details:
print '### Error [pywintypes.erro r]: ' + details[2]

win32api.RegClo seKey(appKey)
</code>

This works, but I was wondering wether that is the best way to go about
this? Can I be sure it lists *all* the applications? What does it mean when
a pywintypes.erro r is thrown (code 13, 'Invalid data')?

Thanks,
g

Jul 19 '05 #1
4 7223
Get Tim Golden's wmi module
(http://tgolden.sc.sabren.com/python/wmi.html). I recently had to help
my brother remove some spyware, and so I used some of the example that
came with WMI to read through the registry to extract startup keys,
services, etc.

Even if your users aren't sophisticated enough to mess with the
registry, rest assured that the software installation programs are.
You should be able to find traces of any installed commercial program
that was released in the past 5 years - I suspect they *all* leave
traces in the registry at this point. Go to
HKEY_LOCAL_MACH INE\SOFTWARE and you will get a list of software
vendors, and you can enumerate keys from there.

Good luck!
-- Paul

Jul 19 '05 #2
On Thu, 23 Jun 2005 10:11:36 GMT, "Guy Lateur" <gu********@b-b.be>
declaimed the following in comp.lang.pytho n:

This works, but I was wondering wether that is the best way to go about
this? Can I be sure it lists *all* the applications? What does it mean when
a pywintypes.erro r is thrown (code 13, 'Invalid data')?
"All" applications? No... Only those that create registry
entries...

I installed the Eclipse Java IDE, and I'm pretty sure it didn't
do anything with the registry (no "start menu" entry, etc. -- one just
has to know where to find the startup program by hand).

-- =============== =============== =============== =============== == <
wl*****@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
=============== =============== =============== =============== == <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.ne tcom.com/> <

Jul 19 '05 #3
| [TJG]
| Hmmm. While I understand your requirement, it's not as
| thought there's some easily-discernible charactersistic s
| of "commercial software packages which should have licenses
| but which don't"

No? Really? How disappointing.. ;)
| [TJG]
| By the sound of it, you're almost better off compiling
| a list of .exe from machines and building up a blacklist
| from those.

That was kind of the idea at first. However, we have a file server (H:), and
I've seen apps installed on it. So it's pretty hard to know who actually
uses that app just by the .exe - could be several people, too, I guess.
That's why I thought of the registry - which, as you rightfully pointed out,
isn't a perfect strategy, either.

I do understand that I can remove those apps by removing the .exe (+
containing folder, probably), but I'd also like to get an idea of who is
using what right now (and why). That might come in handy at some point later
on. Btw, is there a module called pyWhy or something? :)

Maybe I should also follow Paul's advice and go through the registry on a
vendor/app basis. I mean, ATM, I'm not really concerned about a user having,
say, Cubase installed without a license. My priority right now is to make
sure we have licenses for certain apps we use professionally/commercially
(ACad, Office, ..).
Thanks for the input, people, much appreciated,
g
Jul 19 '05 #4
Not only is it difficult to tell which applications are installed,
it is difficult to tell if an application is still installed as all too
many applications do not remove all their registry keys upon uninstall.

I was going to suggest using a commercial application due to the
messiness of this problem but the one I tried "Tally Systems WebCensus"
(now owned by Novell) failed to find NuMega BoundsChecker and it also
believes Yahoo Messenger is still installed even though it was uninstalled.

Neil
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5165
by: Pieter Linden | last post by:
Is it possible/does anyone know where there's a code snippet that will allow me to read the contents of HKEY_LOCAL_MACHINE\SOFTWARE or something like that so I can get a complete list of installed applications? Even better, can I use it to grab the list of installed applications on a remote machine on my network? (I do have domain admin rights, so I would have permission to read it...) I know what you're going to say... "Uhh... yeah,...
6
1810
by: IC | last post by:
Hi, I'm building a website and I want to include a mailing list. I just want a form where a user could enter their email address, so I could send them more information. I assume that the best way to do this is with ASP. Right now, I'm learning ASP by testing pages using Abyss web sever with Active HTML. I have XP Home, so I can't use IIS. Here are my questions: 1. Is ASP the best way to create a mailing list
11
5205
by: Raquel | last post by:
UDB PE V8.0 on Win XP. I issue the following commands: 1. CONNECT TO SAMPLE USER db2adming USING xxxxx The output is: Database Connection Information Database server = DB2/NT 8.1.3 SQL authorization ID = DB2ADMIN Local database alias = SAMPLE
1
4181
by: Norman Fritag | last post by:
Hi there I have avoided to use active x controls because I thought they are causing more problems then they are doing any good. I a new application I would want to use the tree and list view control in access 2002. Prior to that I like to fine some information or here some feed back from developers who have use active x controls success fully in there application, what their experience was.
8
3054
by: vpettes | last post by:
I am new to Access having used Filemaker for many years. My question has to do with displaying and creating a line item database. What I have is a two tables. One has Name, Location, time, disposition and Offense. The second has Offenses and Description of Offenses. I want to display, on a form, all the fields in table one with the Offense field, a drop down, combo box or list box, able to display more than one item. For example, if the...
2
2113
by: 1idMonk | last post by:
Just installed Windows XP Professional Upgrade on my Inspiron 9300 notebook. I had Windows XP Home Edition prior to the upgrade. Visual Basic .NET 2003 is installed and many projects are already created. I want to building interactive Web Applications now that I have XP Professional . I've installed IIS and FrontPage 2000 Server Extensions.
1
4431
by: Will Arrowsmith | last post by:
Hi all, I am trying to create a small form much like the Windows Explorer 'open with...' dialog box, which will contain a list of all applications installed on the local machine and their associated icons. I can display all installed applications by accessing the registry path: "LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", however this does not give me the path to the applications executable file (which I need...
5
2959
by: Velvet | last post by:
Can someone tell me to what process I need to attach to be able to step through my classic ASP code in VS.net 2003. I'm working on an XP box with IIS installed. I also have VS.net 2005 (The final, never installed beta) installed on this box if it makes a difference (I did not install VS Development Web Server as I'm already using the XP web server). I've seen that I need to attach to the native IIS engine, but I don't know what it's...
0
30254
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is a comprehensive list of all autostart locations for Windows OSes: NOTE : These are some abbreviations used in this list. Please note them carefully: HKCU = HKEY_CURRENT_USER HKLM = HKEY_LOCAL_MACHINE
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10637
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10379
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7660
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.