WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Registry
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Error 5 Opening Registry Key

 Keywords: Error 5 Opening Registry Key RegOpenKey Windows 7 access Denied 

Question:

Can someone please explain error 5 returned from my app trying to open a HKLM registry key. The winbatch app was installed on a win7 as local admin and runs ok if logged on as local admin.

I get this error when trying to run the app as a domain user. Thanks.

Answer:

If it is a Win32 error code, then 5 means "access denied". The level of access that was requested when trying to open the registry key is not granted to the current user. If you are running the script as a logged on normal domain user and are trying to open a key under HKLM for any access other than read-only, then this error is to be expected.
Article ID:   W18228
Filename:   Error 5 Opening Registry Key .txt
File Created: 2012:01:17:11:30:30
Last Updated: 2012:01:17:11:30:30