Highlighted
Absent Member.
Absent Member.
885 views

[archive] error 161 reading registry

[Migrated content. Thread originally posted on 22 October 2004]

Hello all,

I'm trying to read Windows 2000 professional registry, but in open key HKEY_LOCAL_MACHINE i get the status code 161, i dont know which is, but in this part of code things work well:

set Tama?o-Clave to size of Valor-Clave

move "\http\shell\open\command" to Sub-Clave
inspect Sub-Clave replacing trailing spaces by low-values

Call "REG_QUERY_VALUE" using HKEY_CLASSES_ROOT
Valor-Clave
Tama?o-Clave
Sub-Clave
giving Status-Code
end-call

But not the same in this other:

set Tama?o-Clave to size of Valor-Clave

move "\SOFTWARE\Clients\Mail\Microsoft Outlook\
- "Protocols\mailto\shell\open\command" to Sub-Clave

inspect Sub-Clave replacing trailing spaces by
low-values

Call "REG_QUERY_VALUE" using HKEY_LOCAL_MACHINE
Valor-Clave
Tama?o-Clave
Sub-Clave
giving Status-Code
end-call

The path in the registry is correct, i copy paste from registry, but maybe the error come from the different default open-registry-handle, HKEY_LOCAL_MACHINE and HKEY_CLASSES_ROOT. Maybe HKEY_LOCAL_MACHINE is closed (i tried to open it but nothing)? If someone can say me what means status code 161 or the exact problem, it will be of great help.

Thanks very much.

P.D: sorry for my english
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] error 161 reading registry

Error code 161 is a Win32 error code meaning "The specified path is invalid".

You can get a list of Win32 error numbers and brief explanations from:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes.asp
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] error 161 reading registry

I guess this implies the key you try to use is incomplete, or does not exist.
the hive HKEY_LOCAL_MACHINE does for instance not have the subkey:

\http\shell\open\command

Hence, it is logical that you get the error path not found.

I suggest you verify your key.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] error 161 reading registry

ciacsl,
What you are looking for is in the key HKEY_CLASSES_ROOT\HTTP\shell\open\command

Try that instead.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.