Results 1 to 15 of 15

Thread: [RESOLVED] Retrieve Windows XP Serial Number

  1. #1

    Thread Starter
    Lively Member GhostRider888's Avatar
    Join Date
    Apr 2007
    Posts
    113

    Resolved [RESOLVED] Retrieve Windows XP Serial Number

    hey, do u know any way to find winXP SN with vb?
    or at least do u know where is this located in registry?
    i cant find the answer on google neither on psc after lot of research lol

    thanks in advance!

  2. #2
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Retrieve Windows XP Serial Number

    There are tools that do this: ProduKey – however, in my case it didn't return the product key I had in the bottom of my netbook. I don't see a point in duplicating the functionality in VB6.

  3. #3

    Thread Starter
    Lively Member GhostRider888's Avatar
    Join Date
    Apr 2007
    Posts
    113

    Re: Retrieve Windows XP Serial Number

    Quote Originally Posted by Merri View Post
    There are tools that do this: ProduKey – however, in my case it didn't return the product key I had in the bottom of my netbook. I don't see a point in duplicating the functionality in VB6.
    lol i konw that there are tools that do this, thats why i wrote
    do u know any way to find winXP SN with vb?
    thanks anyway

  4. #4
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Retrieve Windows XP Serial Number

    You do it the exact same way in VB6 than any other language. By doing a very simple Google search for "product key" registry I ended up in five clicks to SourceForge page of KeyFinder program. From there you can find a complete source for what you need to do, just not in VB6, but it shouldn't be impossible to convert it.

  5. #5
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Retrieve Windows XP Serial Number

    it's not completely straight-forward. The key is encrypted in xp.

  6. #6
    Addicted Member pcuser's Avatar
    Join Date
    Jun 2008
    Posts
    219

    Re: Retrieve Windows XP Serial Number

    The product key is base24 encoded in the registry at HKLM\SOFTWARE\MICROSOFT\Windows NT\CurrentVersion\DigitalProductId

    code: http://www.planet-source-code.com/vb...xtCodeId=57164
    Last edited by si_the_geek; Jun 21st, 2009 at 10:44 AM. Reason: replaced copyrighted code with link to source

  7. #7

    Thread Starter
    Lively Member GhostRider888's Avatar
    Join Date
    Apr 2007
    Posts
    113

    Resolved Re: Retrieve Windows XP Serial Number

    Quote Originally Posted by Merri View Post
    You do it the exact same way in VB6 than any other language. By doing a very simple Google search for "product key" registry I ended up in five clicks to SourceForge page of KeyFinder program. From there you can find a complete source for what you need to do, just not in VB6, but it shouldn't be impossible to convert it.
    hahaha delphi to vb6? maybe not impossible for u...
    but i hardly code in vb, how could i read delphi and also convert to vb??

    Quote Originally Posted by pcuser View Post
    The product key is base24 encoded in the registry at HKLM\SOFTWARE\MICROSOFT\Windows NT\CurrentVersion\DigitalProductId
    pcuser thank u so much man!!!!!!!!!!

    <www.vbforums.com>
    Thanks for adding reputation to this user. May you be lucky enough to receive the same Reputation back in turn.
    Last edited by GhostRider888; Jun 20th, 2009 at 04:39 PM.

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: [RESOLVED] Retrieve Windows XP Serial Number

    this is interesting as while this returns the same string as the produkey prog linked to above, it does not match the install key on my laptop, which is original install
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  9. #9
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: [RESOLVED] Retrieve Windows XP Serial Number

    westconn1: like me, your laptop has been installed from an OEM version. The product key is then different from what it says in the bottom of your laptop, and from what you can use with the installation disks that you may have (I think).

  10. #10
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Retrieve Windows XP Serial Number

    Quote Originally Posted by pcuser View Post
    The product key is base24 encoded in the registry at HKLM\SOFTWARE\MICROSOFT\Windows NT\CurrentVersion\DigitalProductId
    For curiosity only, how did you learn that the key was base24 encoded?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  11. #11
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: [RESOLVED] Retrieve Windows XP Serial Number

    He copy'n'pasted from Planet Source Code, of course.

  12. #12
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: [RESOLVED] Retrieve Windows XP Serial Number

    westconn1: like me, your laptop has been installed from an OEM version. The product key is then different from what it says in the bottom of your laptop, and from what you can use with the installation disks that you may have (I think).
    yeah mine actually came with disks, unlike most now
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  13. #13

    Thread Starter
    Lively Member GhostRider888's Avatar
    Join Date
    Apr 2007
    Posts
    113

    Re: [RESOLVED] Retrieve Windows XP Serial Number

    Quote Originally Posted by LaVolpe View Post
    For curiosity only, how did you learn that the key was base24 encoded?
    Quote Originally Posted by Merri View Post
    He copy'n'pasted from Planet Source Code, of course.
    loool you wanted him to write all this source just for me ????
    i did a search before on psc but with no result,
    i guess i m not a good searcher, i should try more words...

  14. #14
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: [RESOLVED] Retrieve Windows XP Serial Number

    We don't expect people to write code of that standard just to help (tho it does happen at times), but we do expect people to respect the law and our rules (see the Acceptable Use Policy link at the bottom of all VBForums pages):
    # You will not post any copyrighted material, nor link to any copyrighted material (with the exception of publicly available sites and pages that the legal owners of the copyrights have created to make that material freely available to the general public), unless that copyright is owned by you or by these Forums.
    As it was a clear copyright (and thus rule) violation, I have replaced the code with a link to the original source.

  15. #15
    Addicted Member pcuser's Avatar
    Join Date
    Jun 2008
    Posts
    219

    Re: [RESOLVED] Retrieve Windows XP Serial Number

    My apologies. I did not get the code directly from that link and it did not have the copyright notice and credits when I got it. I would NOT have removed them either.

    @LaVolpe,
    I'm not the one that figured out the base24 encoding.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width