HighTechTalks DotNet Forums  

API for registry

VB.net microsoft.public.dotnet.languages.vb


Discuss API for registry in the VB.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default API for registry - 05-05-2004 , 09:32 AM






Is there an API call to get registry information for the CD Key in Windows and
other applications that would be installed, if someone were to loose the key or
misplace it. I'm attempting to write an application that will recover these
keys for my internal use.

Any help would be appreciated. This is a second post, the first one, someone
suggested calling Micrsoft, they'd give them one. I know this information is in
the Registry on the computer, just not sure how to pull it to use on a
reinstallation.

Michael

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: API for registry - 05-05-2004 , 10:14 AM






* lumpierbritches (AT) aol (DOT) com (Lumpierbritches) scripsit:
Quote:
Is there an API call to get registry information for the CD Key in Windows and
other applications that would be installed, if someone were to loose the key or
misplace it. I'm attempting to write an application that will recover these
keys for my internal use.
I doubt that all of these keys are stored in the registry. Use the
'Microsoft.Win32.Registry' class to access the registry (see
documentation on this class for samples).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


Reply With Quote
  #3  
Old   
Ken Tucker [MVP]
 
Posts: n/a

Default Re: API for registry - 05-05-2004 , 10:19 AM



Hi,

Here is how to get the window product id from the registry on
windows xp. Not sure where to find the cd key.

add to top of file
Imports Microsoft.Win32

Some code
Dim myReg As RegistryKey = Registry.LocalMachine
Dim MyRegKey As RegistryKey
Dim MyVal As String

MyRegKey = myReg.OpenSubKey("Software\Microsoft\Windows
NT\CurrentVersion")
MyVal = MyRegKey.GetValue("ProductID")

MyRegKey.Close()
txtRegistry.Text = String.Format("Product ID {0}", MyVal)


Ken
----------------
"Lumpierbritches" <lumpierbritches (AT) aol (DOT) com> wrote

Quote:
Is there an API call to get registry information for the CD Key in Windows
and
other applications that would be installed, if someone were to loose the
key or
misplace it. I'm attempting to write an application that will recover
these
keys for my internal use.

Any help would be appreciated. This is a second post, the first one,
someone
suggested calling Micrsoft, they'd give them one. I know this information
is in
the Registry on the computer, just not sure how to pull it to use on a
reinstallation.

Michael



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.