Closed Bug 684136 Opened 13 years ago Closed 13 years ago

activate.bat fails if a user installs Python "just for me"

Categories

(Add-on SDK Graveyard :: General, defect, P2)

All
Windows Vista
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: markh, Unassigned)

Details

If a user installs Python and selects the option "just for me" instead of "for all users", then activate.bat will fail to find the Python.  Installing "just for me" will write the registry entries to HKEY_CURRENT_USER but activate.bat checks only for HKEY_LOCAL_MACHINE.

I *think* anyway :)  Haven't actually confirmed this but it seems very likely from reading the batch file.  I'll try and verify this later.
Priority: -- → P2
Mark, if you're still able to look at this, can you see if it works for you when you use the contents of this activate.bat file? https://github.com/KWierso/addon-sdk/blob/master/bin/activate.bat

It should make the batch file look in HKLM first, and if it doesn't find anything in there, it looks in HKCU.


Myk, this is pull request 246:
https://github.com/mozilla/addon-sdk/pull/246

Note, I have no idea what I'm doing in batch scripting, so I don't know if this is correct. I have Python installed "for all users", so I can't see if this patch really does fix it, but it doesn't do any worse for me when I try using it with my globally-installed Python.
Status: UNCONFIRMED → NEW
Ever confirmed: true
After uninstalling Python (and then cleaning up the registry entry left behind in HKLM), and reinstalling Python "just for me", my patched activate.bat did pick up the registry entry in HKCU.
I think we should work on the activate.bat in bug 571843 first - that gives a better place to start from and should also be able to avoid the problem of an empty HKLM/Python key screwing up the detection.  I'm going to test that other .bat file now and might even roll the changes you made here into that.
D'oh!

Mark: Sorry, I merged this a few minutes after you commented, without seeing your comment first.

https://github.com/mozilla/addon-sdk/commit/d06e5925cdbd70b0097024cfcbe1027d24ef7924

We can back it out if that helps, although it seems like we're just as well off leaving in this change, even if we largely rewrite the script for bug 571843.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
cc:ing hwiechers so he knows about this fix, in case he's interested in applying a similar one to activate.ps1.
You need to log in before you can comment on or make changes to this bug.