467,893 Members | 1,896 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,893 developers. It's quick & easy.

extract python install info from registry

rbt
On windows xp, is there an easy way to extract the information that
Python added to the registry as it was installed?
Dec 6 '05 #1
  • viewed: 1684
Share:
8 Replies
rbt wrote:
On windows xp, is there an easy way to extract the information that
Python added to the registry as it was installed?

Using regedit.exe, look at the registry keys and values under

HKEY_LOCAL_MACHINE\Software\Python

If you need to know how to read the registry from Python: please install
the python win32 extensions (or use ActivePython).

Les

Dec 6 '05 #2
rbt
Laszlo Zsolt Nagy wrote:
rbt wrote:
On windows xp, is there an easy way to extract the information that
Python added to the registry as it was installed?

Using regedit.exe, look at the registry keys and values under

HKEY_LOCAL_MACHINE\Software\Python

If you need to know how to read the registry from Python: please install
the python win32 extensions (or use ActivePython).

Les


There's more to it than that... isn't there? I've used _winreg and the
win32 extensions in the past when working with the registry. I thought
perhaps someone had already scripted something to extract this info.

I'm creating a Python plugin for Bartpe (Windows Pre-Install
Environment) and it works OK, but to make it work _exactly_ like it does
on XP (.py and .pyw associate with python and pythonw), I need to
extract the reg entries so I can recreate them in the WinPE environment.

Thanks!
Dec 6 '05 #3
There's more to it than that... isn't there? I've used _winreg and the
win32 extensions in the past when working with the registry. I thought
perhaps someone had already scripted something to extract this info.

Ok, if you need to get all changes in the registry, you can use regdiff.

http://p-nand-q.com/download/regdiff.html

Take a snapshot before and after installing Python. However, this is not
a wise approach.
For example:

1. One can have a system drive 'C:\' others 'G:\'
2. One can have Windows installed in \Windows others in \WinNT and
others in \MyWinNT
3. For many registry values, you cannot really tell if you need to
correct a value or not.

As a result, I believe you will only be able to use the 'regdiff' only
on the same type of computer, with the same system drive, same system
directory, same windows version etc. For other computers, there is no
guarantee for that it will work.

Les

Dec 6 '05 #4

There's more to it than that... isn't there? I've used _winreg and the
win32 extensions in the past when working with the registry. I thought
perhaps someone had already scripted something to extract this info.


Yes, a small firm named Microsoft has done this (but not tested w/2.4):

http://www.microsoft.com/technet/scr.../osrgpy01.mspx

Dec 6 '05 #5
rbt
gene tani wrote:
There's more to it than that... isn't there? I've used _winreg and the
win32 extensions in the past when working with the registry. I thought
perhaps someone had already scripted something to extract this info.


Yes, a small firm named Microsoft has done this (but not tested w/2.4):

http://www.microsoft.com/technet/scr.../osrgpy01.mspx


That tells me this:

Caption: Registry
Current Size: 2
Description: Registry
Install Date: 20051125152108.000000-300
Maximum Size: 54
Name: Microsoft Windows XP
Professional|C:\WINDOWS|\Device\Harddisk0\Partitio n1
Proposed Size: 54
Status: OK
Dec 6 '05 #6
"rbt" <rb*@athop1.ath.vt.edu> wrote:
On windows xp, is there an easy way to extract the information that Python added to the registry as it was installed?


You should be able to find all the entries in msi.py that's used to build the
installer.

Roger


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Dec 6 '05 #7
[Laszlo Zsolt Nagy wrote]
rbt wrote:
On windows xp, is there an easy way to extract the information that
Python added to the registry as it was installed?

Using regedit.exe, look at the registry keys and values under

HKEY_LOCAL_MACHINE\Software\Python

If you need to know how to read the registry from Python: please install
the python win32 extensions (or use ActivePython).


Actually you don't need the PyWin32 extensions to read the Windows
registry since the _winreg module was added to the Python core.

Trent

--
Trent Mick
Tr****@ActiveState.com
Dec 6 '05 #8
rbt wrote:
I'm creating a Python plugin for Bartpe (Windows Pre-Install
Environment) and it works OK, but to make it work _exactly_ like it does
on XP (.py and .pyw associate with python and pythonw), I need to
extract the reg entries so I can recreate them in the WinPE environment.


If it's just a matter of creating those associations, I believe you can
do that equally well using the "ftype" and "assoc" console commands, via
os.system() or something similar.

-Peter

Dec 7 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by StepH | last post: by
4 posts views Thread by GujuBoy | last post: by
8 posts views Thread by mistral | last post: by
reply views Thread by OldManRiver | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.