MePHiTiC Posted February 16, 2007 Share Posted February 16, 2007 I've got a VBS script which changes Windows XP CD Key. I'm putting together a script to install a bunch of updates, registry tweaks, security patches, etc... During this I'd like to change the Windows key to our VLK. Right now I'm using the below VBS script outside of AutoIT. I'd like to have AutoIT do it so everyting is compact and easy. Can AutoIT change my Windows CD Key? If so how would I go about that? ' ' 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 change_vlk_sp1.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 Thanks for any help! MePH Link to comment Share on other sites More sharing options...
James Posted February 16, 2007 Share Posted February 16, 2007 There is a VB to autoit converter. Try that. About editing keys. As far as I know they are in the registry right? Well yes of they are and they are not encrypted (which they most probably will be). Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
MePHiTiC Posted February 23, 2007 Author Share Posted February 23, 2007 There is a VB to autoit converter. Try that. About editing keys. As far as I know they are in the registry right? Well yes of they are and they are not encrypted (which they most probably will be).I tried the converter and it did convert the script however I can't get it to run now. I've been looking for topics on encrypting the new key however I've come up short and couldn't find anything.Anyone else have an idea?Thanks again,MePH Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 23, 2007 Moderators Share Posted February 23, 2007 You don't think by doing this that you very well could screw up any other software that may have initially set something based on the windows key? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
James Posted February 23, 2007 Share Posted February 23, 2007 (edited) Couldn't this be used as a virus? I mean, they can change the code to an illegal one and then when automatic updates etc, it cant be done. Trust me, I should know about illegal keys Edited February 23, 2007 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Shevilie Posted February 23, 2007 Share Posted February 23, 2007 Why the f*** would you change another persons key into an illegal.... Makes really no sense at all... If this should be used to anything illegal then it should be to those who got a pirate win and want to change the cd-key so it would work with win-update.... Never heard of a virus deleting your key... Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
MePHiTiC Posted February 23, 2007 Author Share Posted February 23, 2007 Why the f*** would you change another persons key into an illegal.... Makes really no sense at all... If this should be used to anything illegal then it should be to those who got a pirate win and want to change the cd-key so it would work with win-update.... Never heard of a virus deleting your key...This is pretty much what we're doing. A bunch of workstations was loaded with a CD which had a key that wasn't ours. Now that we have a correct key we're trying to update the workstations to a legal key. We can do it with the above VBS script, however since we're installing other updates and patches I thought it would be easier if everything was handled within an AutoIT script.MePH Link to comment Share on other sites More sharing options...
MePHiTiC Posted February 23, 2007 Author Share Posted February 23, 2007 You don't think by doing this that you very well could screw up any other software that may have initially set something based on the windows key?Didn't really realize that other software besides Windows is keyed from the Windows Installation Key ... We've already changed a bunch of workstations without any ill effect so far, but I guess it could be possible. Never gave it much thought.MePH Link to comment Share on other sites More sharing options...
sherkas Posted April 14, 2007 Share Posted April 14, 2007 There is way... this is the long hard way though. Get the autoit script to manually edit the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents\OOBETimer to a incorrect value. then just run this program: "c:\windows\system32\oobe\msoobe.exe /a" When it loads up click second entry (validate via phone) Then click the option to change product key. Entry key click save. 100% valid windows xp pro cd key changing. All you have to do is do pixel checking or delays and do what I said above and it should take <30 secs to change any windows key even if you use delays to wait for the screens to change. Easy way: Make your autoit script run that vbs script. If you dont like that, make ur autoit write that file, run it, delete it. That way its all in one autoit file. Link to comment Share on other sites More sharing options...
thor918 Posted June 16, 2007 Share Posted June 16, 2007 How about using this code?:http://www.autoitscript.com/forum/index.ph...9343&hl=wpaIt has a set product key function:;Tested;$key="ENTER-SOMEK-EYHER-ETOTE-STIT!";Msgbox(0,"SetProductKey",_WPA_SetProductKey($key)) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now