English
Source / code snippets

Reading Digitalproductid Productkey windows

 
Frabbing (20.11.2010)
One small Source, around the windows Product-Key auszulesen:
CompileMarkSeparation
'
' © Frank Abbing für Paules-PC-Forum
' ./../../sys/?nohdr=1&u=www.paules-pc-forum.de/forum/xprofan/
'
 $H windows.ph
Declare mem#, memnew#, digits#, x&, pkey$
Dim mem#, 280
Dim memnew#, 280
Dim digits#,100
Clear mem#
Clear memnew#
String digits#, 0 = "BCDFGHJKMPQRTVWXY2346789"
Var path$ = "Software\\Microsoft\\Windows NT\\CurrentVersion"
Var item$ = "DigitalProductID"
Var key& = 0
Var size& = 280
~RegOpenKeyEx($80000002, Addr(path$), 0, $20119, Addr(key&))
~RegQueryValueEx(key&, Addr(item$), 0, 0, mem#, Addr(size&))

If size&<>280

    ~RegCloseKey(key&)

    WhileLoop 24, 0, -1

        x& = 0

        WhileLoop 66, 52, -1

            x& = (x& << 8) + Byte(mem#, &loop)
            Byte mem#, &loop = x& / 24
            x& = x& mod 24

        EndWhile

        Byte memnew#, &loop = Byte(digits#, x&)

    EndWhile

    pkey$=Char$(memnew#, 0, 5) + "-" + Char$(memnew#, 5, 5) + "-" + Char$(memnew#, 10, 5) + "-" + Char$(memnew#, 15, 5) + "-" + Char$(memnew#, 20, 5)
    MessageBox(pkey$, "Ihr Windows Produkt-Key lautet:", 64)

Else

    MessageBox("...konnte leider nicht ermittelt werden.", "Ihr Windows Produkt-Key...", 64)

EndIf

 
02/07/11  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.117 Views

Untitledvor 0 min.
Ralf Netz05/22/21
RudiB.03/16/21
Manfred Barei06/20/19
ByteAttack08/11/14
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie