Announcement

Collapse
No announcement yet.

Anyone got code for Win XP key Finder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • nals
    replied
    Here is the vb file

    Code:
    ' 
    ' WMI Script - ChangeVLKey.vbs
    '
    ' This script changes the product key on the computer
    '
    '***************************************************************************
    
    ON ERROR RESUME NEXT
    
    
    if Wscript.arguments.count<1 then
       Wscript.echo "Script can't run without VolumeProductKey argument"
       Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"
       Wscript.quit
    end if
    
    Dim VOL_PROD_KEY
    VOL_PROD_KEY = Wscript.arguments.Item(0)
    VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any
    
    for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")
    
       result = Obj.SetProductKey (VOL_PROD_KEY)
    
       if err <> 0 then
          WScript.Echo Err.Description, "0x" & Hex(Err.Number)
          Err.Clear
       end if
    
    Next

    Leave a comment:


  • rexzooly
    replied
    Originally posted by nals View Post
    rexzooly ,, sorry I have exported and attached again

    TimeSurfer , I m using Win XP pro
    change the button to :

    ChangeXPKey()
    /// i don't have the VB files so i can't test,
    Last edited by rexzooly; 04-13-2008, 06:39 PM.

    Leave a comment:


  • nals
    replied
    rexzooly ,, sorry I have exported and attached again

    TimeSurfer , I m using Win XP pro
    Attached Files

    Leave a comment:


  • TimeSurfer
    replied
    are you using xp home or pro. i believe this script is for build 2600 which is pro. ill look over the apz you provided and get back with you in a moment.

    Leave a comment:


  • rexzooly
    replied
    Originally posted by nals View Post
    TimeSurfer
    I did that but not working :(

    attached the file
    export the file by saving your file then clicking export this will export it as
    a APZ thanks :yes

    Leave a comment:


  • nals
    replied
    TimeSurfer
    I did that but not working :(

    attached the file
    Attached Files

    Leave a comment:


  • TimeSurfer
    replied
    Here you go nals,
    just put the following function in your global functions, and make sure the changeXPProductKey.vbs is located in your projects docs folder. Then just call the function as normal. [feel free to modify it if you need to.]

    Code:
    function ChangeXPKey()
     keyinput = Input.GetText("Input1");
     File.Run("AutoPlay\\Docs\\changeXPProductKey.vbs", keyinput, "", SW_MINIMIZE, false);
    end

    Leave a comment:


  • nals
    replied
    ShadowUK a sample would be good

    Leave a comment:


  • ShadowUK
    replied
    Originally posted by GoOgLe View Post
    yes it runs the vbs file but what i meant was how to change the key in vbs file with input object or dialog input ???
    Well, Use File.Run with arguments, like Input.GetText or str = Dialog.Input.

    Leave a comment:


  • GoOgLe
    replied
    yes it runs the vbs file but what i meant was how to change the key in vbs file with input object or dialog input ???

    Leave a comment:


  • ShadowUK
    replied
    Originally posted by GoOgLe View Post
    how can i change the key in vbs from ams ? maybe a dialog input or something to change it...
    File.Open ?

    Leave a comment:


  • GoOgLe
    replied
    Originally posted by clueless View Post
    While were on the subject ...
    (vbScript)
    Code:
    ' 
    ' WMI Script - ChangeVLKey.vbs
    '
    ' This script changes the product key on the computer
    '
    '***************************************************************************
    
    ON ERROR RESUME NEXT
    
    
    if Wscript.arguments.count<1 then
       Wscript.echo "Script can't run without VolumeProductKey argument"
       Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"
       Wscript.quit
    end if
    
    Dim VOL_PROD_KEY
    VOL_PROD_KEY = Wscript.arguments.Item(0)
    VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any
    
    for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")
    
       result = Obj.SetProductKey (VOL_PROD_KEY)
    
       if err <> 0 then
          WScript.Echo Err.Description, "0x" & Hex(Err.Number)
          Err.Clear
       end if
    
    Next
    Usage : save it in a textfile with .VBS extension and then run it like a commandline program.
    how can i change the key in vbs from ams ? maybe a dialog input or something to change it...

    Leave a comment:


  • Bruce
    replied
    I would love to see the same thing for emails (with permission of course)

    Leave a comment:


  • clueless
    replied
    While were on the subject ...
    (vbScript)
    Code:
    ' 
    ' WMI Script - ChangeVLKey.vbs
    '
    ' This script changes the product key on the computer
    '
    '***************************************************************************
    
    ON ERROR RESUME NEXT
    
    
    if Wscript.arguments.count<1 then
       Wscript.echo "Script can't run without VolumeProductKey argument"
       Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"
       Wscript.quit
    end if
    
    Dim VOL_PROD_KEY
    VOL_PROD_KEY = Wscript.arguments.Item(0)
    VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any
    
    for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")
    
       result = Obj.SetProductKey (VOL_PROD_KEY)
    
       if err <> 0 then
          WScript.Echo Err.Description, "0x" & Hex(Err.Number)
          Err.Clear
       end if
    
    Next
    Usage : save it in a textfile with .VBS extension and then run it like a commandline program.
    Last edited by clueless; 04-12-2008, 12:14 PM.

    Leave a comment:


  • RizlaUK
    replied
    RizlaUK your a lifesaver, Thank you
    no problem nals

    They help to all AMS users Always.
    yup...if i had a penny for every pice of code iv posted i'd have a full £5 by now......lol

    Leave a comment:

Working...
X