Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Sep : PoductID registry key in Vista
| Subject: | PoductID registry key in Vista |
| Posted by: | "Patrick Hughes" (duhvinci@-removethis-engds.com) |
| Date: | Thu, 13 Sep 2007 16:07:27 |
I have a couple of programs where I rely upon the registry key:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductID to generate a
unique value for subsequent authorization codes to my program. It appears
from my recent searches that this key is encrypted in Vista and I think I'm
getting some exceptions in my code as a result.
The other possibility is I am raising an exception when I try to access the
key via a Reg := TRegistry.Create(KEY_READ) and subsequent reads through
Reg.OpenKeyReadOnly... I have seen some posts referencing the possibility of
eliminating the (KEY_READ) access parameter, as the OpenKeyReadOnly method
will make several different attempts to access the value and thus have a
better chance of success.
Unfortunately, I do not have Vista nor easy access to a user with Vista, so
my questions are:
Is it true the ProductID key is encrypted and if so what type of value does
reading this key produce (prior to Vista this returns a string)?
Is this also the case for the key HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProductID?
Will eliminating the (KEY_READ) parameter indeed help my situation?
I am essentially interested in finding a value that will work consistently
for Windows NT\2000\XP\Vista - I'm not married to the ProductID. Any
suggestions?
Thanks for you help,
--
Patrick Hughes