import win32api
import win32con
key = win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE,’SOFTWARE’,0,win32con.KEY_ALL_ACCESS)
error reporting pywintypes.error: (5, ‘RegOpenKeyEx’, ‘xbe\ xbe\xf8\xb7\xc3\ xca\xa1\xa3’)
then the positioning problem occurred in win32con.key_all_access, which was due to the willingness of the registry access to be denied, so the access permission needed to be increased, by the following methods:
the first method:
WIN7 has administrator privileges:
1. Right-click computer, go to administration, and find users and groups.
2. Find administrators, right-click to bring up the property, and remove the check mark before “this account is disabled”.
back to the desktop
3. Create a new “notepad” and copy as follows:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\runas]
@=” administrator takes ownership”
“NoWorkingDirectory”=””
[HKEY_CLASSES_ROOT\*\shell\runas\command]
@=”cmd.exe /c takeown /f \”%1\” & & icacls \”%1\” /grant administrators:F”
“IsolatedCommand”=”cmd.exe /c takeown /f \”%1\” & & icacls \”%1\” /grant administrators:F”
[HKEY_CLASSES_ROOT\exefile\shell\runas2]
@=” administrator takes ownership”
“NoWorkingDirectory”=””
[HKEY_CLASSES_ROOT\exefile\shell\runas2\command]
@=”cmd.exe /c takeown /f \”%1\” & & icacls \”%1\” /grant administrators:F”
“IsolatedCommand”=”cmd.exe /c takeown /f \”%1\” & & icacls \”%1\” /grant administrators:F”
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@=” administrator takes ownership”
“NoWorkingDirectory”=””
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@=”cmd.exe /c takeown /f \”%1\” /r /d y & & icacls \”%1\” /grant administrators:F /t”
“IsolatedCommand”=”cmd.exe /c takeown /f \”%1\” /r /d y & & icacls \”%1\” /grant administrators:F /t”
and then save as win7 to get administrator privileges. Reg, suffix must be.reg
imports the saved registry information, thus gaining WIN7 administrator rights.
right click on the folder and “administrator takes ownership” will appear
the second method:
ctrl+r
input lusrmgr. MSC
user — double-click administrator to uncheck the “account disabled” check
logout
select administrator account to log in
Read More:
- [Windows 7 – how to delete files protected by trustedinstaller win7 force deletion of files]
- win7 error code 0x80070522
- Install sql2012 prompt setup account privileges failed solution
- Navicat VMware failed to connect to the database. Possible causes of error 2003
- Error: (2, ‘RegOpenKeyEx’, error resolution
- Error 711: Cannot load Remote Access Service Connection Manager.
- Host is not allowed to connect to this MySQL server
- MySQL installation error. Netframeword installation failed
- Postgres solves permission denied for relation
- MySQL local connection Error 1130_ The solution of MySQL 1130 error report when remote connection through Navicat for MySQL
- Win10 desktop right click display settings MS- settings:display Or Ms- settings:personalization-background resolvent
- NPM ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
- Wrong installation of registry to registry
- Windows 8.1 – Fix This app can’t open for Built-in Administrator account
- MySQL skip grant tables add user error 1290
- Problem solving of runas 740 error
- MYSQL login error: mysqladmin: connect to server at’localhost’ failed
- Remote connection MySQL error 1045 solution
- Net start command system error 5 and error 1058 solution
- Solution to error 1045 in mysqldump