Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 497197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:45:31+00:00 2026-05-13T05:45:31+00:00

This code used to work on Vista (and Windows XP) but after an upgrade

  • 0

This code used to work on Vista (and Windows XP) but after an upgrade to Windows 7 it now fails with the error shown:

Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32
>>> import _winreg
>>> h1 = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)        
>>> key = r'SOFTWARE\Python\PythonCore\2.6\InstallPath'
>>> h2 = _winreg.OpenKey(h1, key, 0, _winreg.KEY_ALL_ACCESS)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
WindowsError: [Error 5] Access is denied

I’m fairly sure this is the result of changes in the security model in Windows 7, but various searches I tried have turned up nothing I can use as an answer so far.

(Not that it should be relevant, but to stave off “why would you do that?” responses, this is for a developer’s utility which can switch the registry between multiple installations of Python, for use in a multi-project environment where we need more control over which version of Python is in use, and what packages are available, than things like virtualenv can provide.)

Edit: The logged-in user is an Administrator. Also, I’ve turned off the UAC (User Access Control) stuff as completely as one can (not true… see next edit), as was previously the case before the upgrade from Vista to Windows 7.

Edit 2: As noted in my own answer below, I hadn’t rebooted after turning off UAC, so it was still set to the default. Apparently this results in the Access denied error (as I confirmed by testing with UAC set to Default and to Never).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:45:31+00:00Added an answer on May 13, 2026 at 5:45 am

    This was a user mistake, compounded or triggered by changes in Windows 7 to how the UAC feature is implemented.

    In Vista, the much-detested User Access Control feature was binary, either on or off. On Windows 7 that has been changed to provide four levels of granularity:

    • Always Notify (when either programs or user tries to change settings)
    • Default (notify only when programs try to make changes, and dim screen)
    • Notify without dimming (same as default but don’t dim screen when notifying)
    • Never notify (for either programs or user changes)

    My mistake was in not rebooting after dropping the UAC feature down to the Never Notify level. (Vista was aggressive about requesting that you reboot, while Windows 7 seems to be slightly more passive.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this might seem silly, but why does the following code only work
The following javascript function used to work: function tbComment_onKeyDown(ID) { var commentPop = $find(WebDialogWindowComment)
I have this code UPDATE OPENQUERY (db,'SELECT * FROM table WHERE ref = ''+
I have the following code: $('#main-nav a').mouseover(function() { var name = $(this).attr(rel); $(#subnav ul.
This is a question more about how to build a c++ application than it
can anyone get me a code for hiding the time stamp from a string.
I'm working on an app that saves a file in Path.GetDirectoryName(FilePath) where FilePath =
I am working on a relatively simple, independent process starter that I would like
I'm going through Agile Web Development with Rails and I'm having some trouble with
I have some image data (jpeg) I want to send from my iPhone app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.