Sign in to follow this  
Followers 0
cppman

WinXP Serial Key

49 posts in this topic

Hi. This is my first time posting here, and im bored so here:

Here is an idea program for someone to make.

Make a program that will return the Windows XP Serial Key to the current user in a message box.(or a gui whatever u like)

-Chris

Share this post


Link to post
Share on other sites



You can do this easily using the RegRead and MsgBox functions. Have a read of the Help manual - it's the best tutorial on AutoIt outside of the developers themselves.

Share this post


Link to post
Share on other sites

lmao. forgot about RegRead......

but, thansk for reminding me.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hi,

what about that?

$objWMIService = objget("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")

$colSettings = $objWMIService.ExecQuery("Select * from Win32_OperatingSystem")

For $objOperatingSystem in $colSettings
    $Type = StringMid($objOperatingSystem.Caption, 19)
    $Serial = StringMid($objOperatingSystem.SerialNumber, 1)
    MsgBox(64, 'Ouput of Windows Type and Serial', "Type    : "& $Type & @CRLF & "Serial    : " & $Serial)
Next

So long,

Mega

WinXP_Version_SerialKey.au3

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

nice little script.

Thanks, I love little scripts. :o

Maybe I can find some more ideas for such little things.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Here is one to get the product key

Dim $Bin
$Bin = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion","DigitalProductID")

InputBox("Product Key", "Your " & @OSVERSION & " product key is:", DecodeProductKey($bin), "", -1, 100, -1, -1)


Func DecodeProductKey($BinaryDPID)
   Local $bKey[15]
   Local $sKey[29]
   Local $Digits[24]
   Local $Value = 0
   Local $hi = 0
   local $n = 0
   Local $i = 0
   Local $dlen = 29
   Local $slen = 15
   Local $Result

   $Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789","")

   $binaryDPID = stringmid($binaryDPID,105,30)

   For $i = 1 to 29 step 2
       $bKey[int($i / 2)] = dec(stringmid($binaryDPID,$i,2))
   next

   For $i = $dlen -1 To 0 Step -1
       If Mod(($i + 1), 6) = 0 Then
           $sKey[$i] = "-"
       Else
           $hi = 0
           For $n = $slen -1 To 0 Step -1
               $Value = Bitor(bitshift($hi ,- 8) , $bKey[$n])
               $bKey[$n] = int($Value / 24)
               $hi = mod($Value , 24)
           Next
           $sKey[$i] = $Digits[$hi +1]
       EndIf

   Next
   For $i = 0 To 28
       $Result = $Result & $sKey[$i]
   Next

   Return $Result
EndFunc

Not written by me but I cant remember you did write it.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Thanks, I took your code, combined it with mine and put a GUI on it. (I´m not very good in creating GUI) :o

I hope anybody likes it.

Edit: position of progressBar has changed.
Edit: Date format changed from MM/DD/YYYY to DD/MM/YYYY

So long,

Mega

WindowsInformationGUI.au3

Edited by Xenobiologist

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Very , VERY VERY !!! SWEET


-jaenster

Share this post


Link to post
Share on other sites

Works great...

Cheers.. :o

Share this post


Link to post
Share on other sites

Works great. Thanks for sharing. :o

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

HI,

thanks for your nice replies. Somebody noticed that the OfficeKey should be added.
So, I added it. :o
I also cleaned up my code a little bit, now it is more readable, I think.

I hope you like it and give me some more ideas and replies.

Edit: Error-handling in func getOfficeKey(). When no Office is installed.

So long,

Mega

WinInformationGUI_1.1.au3

Edited by Xenobiologist

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

I get this error on WinXP Pro (SP2)

C:\Documents and Settings\Fossil Rock\My Documents\My AutoIt Scripts\WinInformationGUI_1.1.au3 (93) : ==> Unable to parse line.:

$colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")

$colSettings = $objWMIService.E^ ERROR

Any ideas?


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

I get this error on WinXP Pro (SP2)

C:\Documents and Settings\Fossil Rock\My Documents\My AutoIt Scripts\WinInformationGUI_1.1.au3 (93) : ==> Unable to parse line.:

$colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")

$colSettings = $objWMIService.E^ ERROR

Any ideas?

I received an error on line 260 undeclaired Variable - $officeKey - I declaired the variable as Local and ran with no errors but the GUI disappeared before I was able to view it. Any ideas on what I am missing?

C:\programming\Windows_INFO.au3 (260) : ==> Variable used without being declared.:

Dim $var = RegEnumKey($officeKey, $i)

Dim $var = RegEnumKey(^ ERROR

>AutoIT3.exe ended.

>Exit code: 0 Time: 2.962

By the way the developers as well as anyone else creating and sharing the code for this product - hats off to you.


All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

I received an error on line 260 undeclaired Variable - $officeKey - I declaired the variable as Local and ran with no errors but the GUI disappeared before I was able to view it. Any ideas on what I am missing?

C:\programming\Windows_INFO.au3 (260) : ==> Variable used without being declared.:

Dim $var = RegEnumKey($officeKey, $i)

Dim $var = RegEnumKey(^ ERROR

>AutoIT3.exe ended.

>Exit code: 0 Time: 2.962

By the way the developers as well as anyone else creating and sharing the code for this product - hats off to you.

Hi,

thanks for your replies! I added some error handling posted the script again. :o

I get this error on WinXP Pro (SP2)

C:\Documents and Settings\Fossil Rock\My Documents\My AutoIt Scripts\WinInformationGUI_1.1.au3 (93) : ==> Unable to parse line.:

$colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")

$colSettings = $objWMIService.E^ ERROR

Any ideas?

Hmmh, I´ve got XP SP1, but I don´t think that´s the point. Maybe you´ve got Windows XP Home Edition. The WMI isn´t fully installed. That might cause the problem.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hi,

thanks for your replies! I added some error handling posted the script again. :o

Hmmh, I´ve got XP SP1, but I don´t think that´s the point. Maybe you´ve got Windows XP Home Edition. The WMI isn´t fully installed. That might cause the problem.

So long,

Mega

That worked for me, thanks for the support.


All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Share this post


Link to post
Share on other sites

Hi,

thanks for your replies! I added some error handling posted the script again. :o

Hmmh, I´ve got XP SP1, but I don´t think that´s the point. Maybe you´ve got Windows XP Home Edition. The WMI isn´t fully installed. That might cause the problem.

So long,

Mega

I get the same error with the new version. I'm using XP Pro (SP2). I'm going to see if there is a way to reinstall the WMI.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

After reinstalling the WMI toolkit I still have the same error. :o


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

I have this error

C:\Program Files\AutoIt3\Examples\From Forum\WinInformationGUI_1.1.au3 (93) : ==> Unable to parse line.:

$colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")

$colSettings = $objWMIService.E^ ERROR

any idea ?

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

I have this error

C:\Program Files\AutoIt3\Examples\From Forum\WinInformationGUI_1.1.au3 (93) : ==> Unable to parse line.:

$colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")

$colSettings = $objWMIService.E^ ERROR

any idea ?

HI,

do you use beta? Please download beta and try again. Same to you Fossil Rock.

Download Latest Beta Link

Hope that helps...

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0