Access to Windows "Add/Remove Programs"?

S

Sean DiZazzo

Hi all,

I'm trying to find a way to get a list of all the installed programs
on a Windows box via Python. I thought of a few hacks that might
partially work, and then thought about "Add/Remove Programs" Seems
like the right way to go. I looked over the pywin32 docs a bit, but
nothing slapped me in the face.

Is there any reliable way to get at that info?

Thanks in advance,

~Sean
 
L

Larry Bates

Sean said:
Hi all,

I'm trying to find a way to get a list of all the installed programs
on a Windows box via Python. I thought of a few hacks that might
partially work, and then thought about "Add/Remove Programs" Seems
like the right way to go. I looked over the pywin32 docs a bit, but
nothing slapped me in the face.

Is there any reliable way to get at that info?

Thanks in advance,

~Sean

I would guess that that program gets the information from the registry.
Maybe looking at HKEY_LOCAL_MACHINE\SOFTWARE or HKEY_CURRENT_USER\Software branches?

-Larry
 
G

Gabriel Genellina

I'm trying to find a way to get a list of all the installed programs
on a Windows box via Python. I thought of a few hacks that might
partially work, and then thought about "Add/Remove Programs" Seems
like the right way to go. I looked over the pywin32 docs a bit, but
nothing slapped me in the face.

Is there any reliable way to get at that info?

You may enumerate the entries under this registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
 
S

Sean DiZazzo

You may enumerate the entries under this registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Thank both of you. Perfect!

~Sean
 
M

Mike Driscoll

Thank both of you.  Perfect!

~Sean

I have used both of these methods, but it should be noted that not all
programs register themselves in the registry. The usual suspects are
spyware related. But there are still a few programs that you can just
download and unzip that don't write anything to the registry.

But this does work for probably 99% of programs on Windows.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top