wizy Posted November 24, 2006 Posted November 24, 2006 Can anyone share a key change script like promptkey.vbs with me? I want to add that to mine as well.
uid0 Posted November 25, 2006 Posted November 25, 2006 AFAIK key change scripts only work on VLK, whereas oemscan only works on royalty OEM XP.
wizy Posted November 26, 2006 Posted November 26, 2006 uid0, the script (floppy shared it with me) works on corp/vlk, oem, and retail for me. I've tested it on all three now on both home and pro.
Floppy Posted November 26, 2006 Posted November 26, 2006 uid0, the script (floppy shared it with me) works on corp/vlk, oem, and retail for me. I've tested it on all three now on both home and pro.Maybe Iam missing out on somthing here, but I have used that script for;WinXP PROWinXP HomeWinXp Corp (PRO)
wizy Posted November 26, 2006 Posted November 26, 2006 Nope, your right. We basically said the same thing.
uid0 Posted November 28, 2006 Posted November 28, 2006 I'm sure I'd read that somewhere, not just at KB328874
Bilou_Gateux Posted December 10, 2006 Posted December 10, 2006 Virtual Machine and OEM license for Windows, VMware Virtual Platform & Manufacturer OEMID
Protocol7 Posted December 17, 2006 Posted December 17, 2006 Hi everyone.I stumbled on this site last week when I was trying to reinstall a Packard Bell that had a dead HD. It's amazing the work you guys have come up with and I'm very grateful to you for it I was able to put together a cd that I should be able to use on a few brands of machines but I'm having a major headache with the key change script.I'm using the changekey.vbs that TheUni posted back on page 3 of this thread but no matter what I do it always pops up a dialog box saying "Key Not Changed. You will have to change it later". Is it because I'm trying to replace a SLP key with another (vendor-specific) SLP key? I'm doing this on an OEM Home Edition SP2 (with RyanVM's post-SP2 fixes addon pack).Here's how a typical entry in my OEMSCAN.INI looks:[Hewlett]PATH=".\HPQ\"MATCHARG=".\HPQ\serial.txt"CMD="cscript changekey.vbs @@@@"The serial.txt file simply contains the vendor-specific key in XXXXX-XXXXX-XXXXX-XXXXX-XXXXX format with no quotes or anything else. Oemscan.log shows that the key script was executed successfully so there's no problem there. I also get the same result running it within Windows. I've tried this with a few different SLP keys (which I know are valid) so an invalid key isn't the cause either. Has the script been changed since then?For now this seems to be the easiest method, but if there was a way to run OEMSCAN before Windows setup looks/prompts for the key that would be even better as I could use it to set the correct SLP key at the start rather than setting one and then changing it at the end of the setup. I saw mention of running it from DetachedProgram earlier but I tried it last night and must have goofed because it didn't run. But for now if someone could help me with this changekey.vbs problem I'd be very happy as I've spent almost 2 days (and many cdrw burns) trying to nail this. Once I have this method working I can start thinking about trickier stuff like DetachedProgram.
xehqter Posted December 17, 2006 Author Posted December 17, 2006 I use the same SLP key for each manufacture so I’m not verse with the ChangeKey scripts. What happens if you run 'cscript changekey.vbs .\HPQ\serial.txt' from the command prompt?
Protocol7 Posted December 17, 2006 Posted December 17, 2006 Hi xehqter.From the command prompt in Windows I get the same error. I also tried it with promptkey.vbs (and setting a regular non-slp key in the winnt.sif file). [Hewlett]PATH=".\HPQ\"MATCHARG="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"CMD="cscript promptkey.vbs @@@@"This didnt work either though, as when oemscan ran the script it popped up the key change dialog with no key inserted. Entering the correct one got the same "key not changed" error. Oemscan.log again shows that the command was executed successfully. When I booted into Windows I was prompted to activate. But this time when I ran oemscan (although it still didn't insert the correct key) when I pasted it into the box it said "key accepted" FreeStyler posted another method earlier using the oobeinfo.ini which seemed the tidiest way (though I haven't figured out how to stop it creating a "Owner" user by default) but yet again even though the oobeinfo.ini was copied correctly and contained the vendor-specific key, it wasn't changed. As a cop-out I could always just leave out a winnt.sif file and enter the correct key manually, but it seems as if the scripts are working for some.The hard work is done really. Being able to build one CD that can install the proper vendor-specific copy of XP is a major help. I'd just like to have them 100% authentic as you can tell from the Product ID if the key matches the Manufacturer (all this info is collected by the WGA tool) so you never know when MS might start taking notice of this. That and I hate having to admit defeat in the face of a challenge B)
Protocol7 Posted December 19, 2006 Posted December 19, 2006 Tried again with a regular oem key in winnt.sif and oobeinfo.ini but still no go. I'm guessing oemscan is being called too late in the setup for the copied file to make a difference.Is there an easier way to call it earlier? (currently it's running from [setupHotfixesToRun] in SVCPACK.INF). I couldn't figure out the RIS+DetachedProgram method that was posted earlier. Does RIS even work for a Home Edition install CD? Seems to be more for server-side deployment of installations.
Protocol7 Posted December 19, 2006 Posted December 19, 2006 From looking around some more I figured out how to get oemscan to run from detachedprogram. Oemscan.bat is copied to the root of c: and executed, copying the appropriate oobeinfo.ini file to the system32\oobe folder on the hard disk. But still setup refuses to read the key from it so after I enter pass the name/organisation screen I'm still presented with the enter product key window.It seems oobeinfo is very unreliable so is there any other method that can be used to specify the product key at this stage of setup?here's how my setup is looking atm:WINNT.SIF[Data]MSDosInitiated=0UnattendedInstall=Yes[Unattended]OemPreinstall=YesOemSkipEula=YesUnattendSwitch=No[GuiUnattended]DetachedProgram=CMD.EXEArguments="/Q /C START %SYSTEMDRIVE%\OEMSCAN.BAT"OOBEINFO.INI[Version]ProductKey ="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"I hate to admit defeat but this is just taking way too long. I must have burned and done over 2 dozen installs trying to get this oobeinfo.ini method to work. So at this stage I'm just hoping there's a more reliable way to set the key.
Bilou_Gateux Posted December 20, 2006 Posted December 20, 2006 (edited) @Protocol7%dospath% variable is parsed from $winnt$.infRIS dospath=c:\$win_nt$.~lsCD dospath=D:\@T39 stage files are read from the local HDD with a RIS based install and read from the CD/DVD with a CD based install.The command is detailled in Device Driver subforum: Drivers from CD: Simple Method.[GuiUnattended]AutoLogon = YesEncryptedAdminPassword = NoAdminPassword = *TimeZone = 105OEMSkipRegional = 1OemSkipWelcome = 1DetachedProgram=".\system32\cmd.exe";CD Based installArguments="/Q /C FOR /F %I IN (%SystemRoot%\SYSTEM32\$WINNT$.INF) DO (FOR %J IN (%I$OEM$) DO (IF EXIST %J (start /min /D%J NirCmd.exe exec hide Drivers.cmd)))"you can try to change the Product Key @T39 in $WINNT$.INF with a drivers.cmd script:CLS:: Set Current Drive as CD CD /D "%~dp0":: Set Drivers Location Folder SET DRV=Drivers:: Install Drivers .\CopyInf.exe "%SystemDrive%\%DRV%":: SLP copy.\oemscan.exe::// this code is just a sample (not checked)nircmd.exe inisetval %SystemRoot%\SYSTEM32\$WINNT$.INF "UserData" "ProductKey" "~qXXXXX-XXXXX-XXXXX-XXXXX-XXXXX~q"nircmdthe code is just an example to customize. You can check the Manufactuter first with OEMSCAN to write the correct Manufacturer SLP ProductKey in $WINNT$.INF. Edited December 21, 2006 by Bilou_Gateux
Protocol7 Posted December 20, 2006 Posted December 20, 2006 It works! Finally!BIG thanks Bilou . This is much better than the old oobeinfo method as it sets the key first time rather than trying to replace one at a later stage. Ah, to think of all the time I wasted on that one....Now I just have one other small hurdle to overcome. I only had an $oem$ folder on the CD to copy nircmd and the oemscan batch file to the hd so i could run them (no extra fixes or drivers). Of course, using this method kills the repair and recovery options of setup so it would be nice if i could just call them directly from the CD. I've been trying to do a hybrid of the code you listed in the arguments below and the cd-detection code that is used in oemscan.bat but my head is melting with variables, if's, do's, % signs and whatnot. So can I just ask humbly to be spoon-fed the correct code to be placed in the cmd arguments for winnt.sif?here's the cd-detection code from oemscan.bat:for %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist %%i\WIN51 set CDROM=%%iAs you can see it looks for the "win51" file and sets that drive as "cdrom". Then it's just a matter of calling "%cdrom%\oem\oemscan.cmd" (oemscan.cmd and nircmd.exe are stored in a folder called "oem" on the root of the cd along with oemscan.exe and the directories containing the oembios files).If I can get his done I'll finally have things exactly as I want them
Bilou_Gateux Posted December 21, 2006 Posted December 21, 2006 Try to add this code to your oemscan.bat@ECHO OFF:: Check Windows version and command line argumentsIF NOT "%OS%"=="Windows_NT" GOTO SyntaxIF NOT "%~1"=="" GOTO SyntaxDISKPART.EXE /? >NUL 2>&1 || GOTO Syntax:: The actual command is a one linerFOR /F "tokens=3" %%A IN ('ECHO list volume ^| DISKPART.EXE ^| FIND.EXE "-ROM "') DO SET CDROM=%%A::: Display the resultSET CDROM:: DoneGOTO:EOF:SyntaxECHO CDROMXP.BAT, Version 1.00 for Windows XPECHO Read the CD-ROM drive letter using Windows' DISKPART utilityECHO.ECHO Usage: CDROMXPECHO.ECHO The last CD-ROM drive letter will be stored in the environment variable CDROM.ECHO This batch file may fail if any disk volume label ends with "-ROM".ECHO.ECHO Written by Rob van der WoudeECHO http://www.robvanderwoude.com:: DoneIF "%OS%"=="Windows_NT" GOTO:EOFthis one don't use tag file but is based of hardware detection.
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