Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
dgoiko

Multiple Windows 7 versions on same iso unattended product key

Recommended Posts

Hello.

I'm new in the world of the unattended installs, and i'm trying to improve my Windows iso's by making them unattended.

I've been reading about Autounattended.xml and how to introduce trial product keys there, and it works nice if you have a single version of windows in your cd, but my problem is that my cd has all the versions of each architecture (ei.cfg removed), so if I insert professional 30-day trial key and then decide to install Home Edition it will promt error.

When I install the cd manually I can click an omit button during the instalation without tiping any key and introduce it later.

My question is, is there any available option inside Autounattended.xml to do this? or is there any way to introduce the correct trial key depending on the version I've chosen?

post-385616-0-01210300-1389659697_thumb.

Thank you very much, and sorry for my english, I'm a bit out of practise.

[Edited to clarify]

My point is to have a CD where I only choose the product version and partitions for the instalation (which is nearly at the begining of the instalation),being the rest unattended, including leting the default trial product keys get installed WITHOUT my intervention to click omit. I usually leave things installing before going to sleep, so I want them to be finished when I wake, not waiting for user input :S. At the moment I got what I want, except that windows keeps asking for the product key instead installing the trial. I'll post my unattended file within 3 hours when I'm back home so you can see my mistakes.

Share this post


Link to post
Share on other sites

If you've eliminated the EI.CFG (AFAIK, the only way to allow all versions to be selectable) then the Default Keys are already there. Just don't input one when you select the Edition. AFAICR, the Key screen appears after the Select Edition screen.

See this (an MSFN member) -

http://www.cluberti.com/blog/2009/08/11/default-keys-for-vista-and-windows-7-deployment/

edit - UNLESS you mean as an Unattended Auto-Selection of both the Edition and the associated Default Key? Also you want to De-select "Activate Automatically".

See this - http://www.msfn.org/board/topic/163116-windows-7-aio-unattended/

Edited by submix8c

Share this post


Link to post
Share on other sites

Thanks for your fast reply. If I'm understanding the second post well, my problem gets solved by inserting several <Key>HYF8J-CVRMY-CM74G-RPHKF-PW487</Key>

inside the answer file, like this_

<ProductKey>	<Key>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</Key>	<Key>YYYYY-YYYYY-YYYYY-YYYYY-YYYYY</Key>	<Key>ZZZZZ-ZZZZZ-ZZZZZ-ZZZZZ-ZZZZZ</Key>	<WillShowUI>OnError</WillShowUI></ProductKey>

am I right? (I havent tested yet because I'm not at home atm).

And you meant that if I insert

<ProductKey>	<Key></Key>	<WillShowUI>OnError</WillShowUI></ProductKey>

or

<ProductKey>    <WillShowUI>OnError</WillShowUI></ProductKey>

it will work aswell?

Will try both and post results back.

Edited by dgoiko

Share this post


Link to post
Share on other sites

No, I did not. I -said- that it will be unnecessary as the appropriate key will be inserted upon Edition Selection (look inside PRODUCT.INI). They are -already there- and they can -not- be Activated, which is why I said DESELECT in the Key Entry screen. Additionally, you can specify only ONE key, not multiples in Unattend/Autounattend.

You asked

my problem is that my cd has all the versions of each architecture, so if I insert professional 30-day trial key and then decide to install Home Edition it will promt error.

<snip>

is there any way to introduce the correct trial key depending on the version I've chosen?

My answer was -

1 - Select the desired Edition (in your case apparently Professional)

2 - Do -not- enter a Key and -Deselect- "Auto Activation"

You have already chosen the Version, so the Setup "automagically" selects the correct (Trial) Key from PRODUCT.INI, of which can -not- be Activated as it's the Default "Trial" key.

Look at this - the Selected Edition Screen comes BEFORE Product Key Screen, so I don't see your problem. :unsure:

http://www.wikihow.com/Install-Windows-7-for-Beginners

Pretty straight-forward. Just because the EI.CFG doesn't exist doesn't (apparently removed) doesn't mean the Process changes. So HOW can you -first- enter a Key (for Professional) and -then- select an Edition (Home Premium)? That's BACKWARDS!

So... are you asking for an Unattended Tutorial? That's -not- what you initially asked.

Here is a -sample only- (many parts missing)

    <settings pass="windowsPE">            <ImageInstall>                <OSImage>                    <InstallFrom>                        <MetaData wcm:action="add">                            <Key>/IMAGE/NAME</Key>                            <Value>Windows 7 HOMEPREMIUM</Value>                        </MetaData>                    </InstallFrom>                                <UserData>                <ProductKey>                    <Key>RHPQ2-RMFJH-74XYM-BH4JX-XM76F</Key>                    <WillShowUI>Never</WillShowUI>                </ProductKey>            </UserData>       

ONE and -only- One "pair" (Edition+Key), not multiples. There's a strange "trick" you would have to do to allow for ANY Selection (ALL "pairs"). I don't want to get into that - complicated.

Besides, WHY would you select Professional while input a different Edition Trial Key? That makes absolutely NO sense!

Here's a thought, since the XML will need inserted into the DVD... Put the EI.CFG in for a SINGLE Edition.

[EditionID]HomePremium[Channel]Retail[VL]0

BOOM! No asking for which Edition - it just gets bypassed, but the REMAINDER of the Process (see link) remains the -same-.

See the following and READ where it speaks of AN (one only) Edition -

http://technet.microsoft.com/en-us/library/dd744535%28v=ws.10%29.aspx

http://technet.microsoft.com/en-us/library/dd744266%28v=ws.10%29.aspx

So, what are you REALLY asking for?

Edited by submix8c

Share this post


Link to post
Share on other sites

I think I didnt explain myself well. If i dont set anything on the unattended file for keys, the step 12 will ALLWAYS appear for me, so I have to click on omit, i never said I want to do it backwards, maybe my english doesnt let me explain myself well.

What I am really asking for:

I've 3 different licenses of windows: Starter <sighs>, Home Prem and Pro, I want a SINGLE dvd that ONLY requires my intervention to select the product version (step 6 in your urls) and partitions to install (step 9), and gets the 30 day trial enabled without ANY user intervention (not even clicking omit), so I can enter my key without problems on first GUI available.

My goal is to have an installer which allows me to switch it on, wait a few secs (until step 9), go away, and by the time I get back find my Windows kindly installed and waiting for me to introduce the drivers and real working product key, manually this time (NOT waiting on step 9 for key, waiting with the Desktop loaded on Administrator).


2 - Do -not- enter a Key and -Deselect- "Auto Activation"

You have already chosen the Version, so the Setup "automagically" selects the correct (Trial) Key from PRODUCT.INI, of which can -not- be Activated as it's the Default "Trial" key.

Look at this - the Selected Edition Screen comes BEFORE Product Key Screen, so I don't see your problem.

liked automagically workd, never heard before xD. My installer does not, it keeps asking me to insert one or click omit. Where is product.ini located? maybe it is missing? (I dont think so, otherwise omit wouldn't work either). This is what they said on your links about it:

If you do not include a product key, Windows prompts the end user for a product key during Windows Welcome. If the end user does not provide a product key, the activation clock gives end users a 30-day grace period during which Windows activation is not required.

ONE and -only- One "pair" (Edition+Key), not multiples. There's a strange "trick" you would have to do to allow for ANY Selection (ALL "pairs"). I don't want to get into that - complicated.

Where's the doc about it? I just need one example of an installed behaving different depending on the OS you choosed on step 6 to work from it, I'm a programmer, it wont be much difficult to deduce how it works if I've got a working example.

Again, thanks for your effort and nice help

Edited by dgoiko

Share this post


Link to post
Share on other sites

(jeez!!!)

You have the links to TechNet that tell about it. You CANNOT have an AIO, pick ONE EDITION, and expect it to "figure out" WHICH key unless

ONE and -only- One "pair" (Edition+Key), not multiples. There's a strange "trick" you would have to do to allow for ANY Selection (ALL "pairs"). I don't want to get into that - complicated.

I DO have a "package" for OEM-AIO but I'm not willing to distribute it (I like NOT being banned). I -could- alter it for your purposes but YOU are asking ME to GIVE you a "canned" package for your purposes.

I WILL provide a FULL "Autounattend.XML" that you can "play with" but YOU must read those TechNet articles to figure it out from there. We are Helpers, not Suppliers -unless- it's in the "Member Contributed Projects", which this SubForum is not. Bear in mind that what I provide is used with a "special purpose" -Install From USB with Mounted ISO- package.

The Base Package Download -

http://www.rmprepusb.com/documents/release-2-0

Tutorials Used -

http://www.rmprepusb.com/tutorials/grub4dos

http://www.rmprepusb.com/tutorials/firawiniso

XML Used

<?xml version="1.0" encoding="utf-8"?><!--http://windowsafg.no-ip.org/win7x86_x64.html--><unattend xmlns="urn:schemas-microsoft-com:unattend">    <settings pass="windowsPE">        <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">            <SetupUILanguage>                <UILanguage>en-US</UILanguage>            </SetupUILanguage>            <InputLocale>0409:00000409</InputLocale>            <SystemLocale>en-US</SystemLocale>            <UILanguage>en-US</UILanguage>            <UserLocale>en-US</UserLocale>        </component>        <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">            <RunSynchronous>                <RunSynchronousCommand wcm:action="add">                    <Order>1</Order>                    <Path>cmd /q /c "FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\FIRADISK\LOADISO.CMD cmd /k %i:\FIRADISK\LOADISO.cmd"</Path>                    <Description>Detecting usb drive</Description>                </RunSynchronousCommand>            </RunSynchronous>            <Diagnostics>                <OptIn>false</OptIn>            </Diagnostics>            <DiskConfiguration>                <WillShowUI>OnError</WillShowUI>                <Disk wcm:action="add">                    <DiskID>0</DiskID>                    <WillWipeDisk>true</WillWipeDisk>                    <CreatePartitions>                        <CreatePartition wcm:action="add">                            <Order>1</Order>                            <Type>Primary</Type>                            <Size>100</Size>                        </CreatePartition>                        <CreatePartition wcm:action="add">                            <Order>2</Order>                            <Type>Primary</Type>                            <Extend>true</Extend>                        </CreatePartition>                    </CreatePartitions>                    <ModifyPartitions>                        <ModifyPartition wcm:action="add">                            <Format>NTFS</Format>                            <Label>System Reserved</Label>                            <Order>1</Order>                            <Active>true</Active>                            <PartitionID>1</PartitionID>                            <TypeID>0x27</TypeID>                        </ModifyPartition>                        <ModifyPartition wcm:action="add">                            <Format>NTFS</Format>                            <Label>WIN7OS</Label>                            <Letter>C</Letter>                            <Order>2</Order>                            <PartitionID>2</PartitionID>                        </ModifyPartition>                    </ModifyPartitions>                </Disk>            </DiskConfiguration>            <DynamicUpdate>                <Enable>false</Enable>                <WillShowUI>Never</WillShowUI>            </DynamicUpdate>                        <ImageInstall>                <OSImage>                    <InstallFrom>                        <Path>E:\sources\install.wim</Path>                        <MetaData wcm:action="add">                            <Key>/IMAGE/NAME</Key>                            <Value>Windows 7 HOMEPREMIUM</Value>                        </MetaData>                    </InstallFrom>                                    <InstallTo>                        <DiskID>0</DiskID>                        <PartitionID>2</PartitionID>                    </InstallTo>                    <WillShowUI>OnError</WillShowUI>                    <InstallToAvailablePartition>false</InstallToAvailablePartition>                </OSImage>            </ImageInstall>            <UserData>                <AcceptEula>true</AcceptEula>                <FullName>submix8c</FullName>                <Organization>ORG-NAME</Organization>                <ProductKey>                    <Key>RHPQ2-RMFJH-74XYM-BH4JX-XM76F</Key>                    <WillShowUI>Never</WillShowUI>                </ProductKey>            </UserData>            <EnableFirewall>true</EnableFirewall>            <EnableNetwork>true</EnableNetwork>            <Restart>Shutdown</Restart>        </component>        <component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">            <DriverPaths>                <PathAndCredentials wcm:action="add" wcm:keyValue="1">                    <Path>$WinPEDriver$</Path>                </PathAndCredentials>            </DriverPaths>        </component>            </settings>    <settings pass="offlineServicing">        <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">            <EnableLUA>false</EnableLUA>        </component>    </settings>    <settings pass="generalize">        <component name="Microsoft-Windows-PnpSysprep" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">            <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>            <DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices>        </component>            <component name="Microsoft-Windows-Security-SPP" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">            <SkipRearm>1</SkipRearm>        </component>    </settings>    <settings pass="specialize">        <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">            <SkipAutoActivation>true</SkipAutoActivation>        </component>        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">            <ComputerName>PC-NAME</ComputerName>            <TimeZone>Eastern Standard Time</TimeZone>        </component>    </settings>    <settings pass="oobeSystem">        <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">            <InputLocale>0409:00000409</InputLocale>            <SystemLocale>en-US</SystemLocale>                        <UILanguage>en-US</UILanguage>            <UserLocale>en-US</UserLocale>        </component>        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">            <RegisteredOwner>Owner</RegisteredOwner>            <RegisteredOrganization>Organization</RegisteredOrganization>            <TimeZone>Eastern Standard Time_dstoff</TimeZone>            <DisableAutoDaylightTimeSet>true</DisableAutoDaylightTimeSet>            <UserAccounts>                <LocalAccounts>                    <LocalAccount wcm:action="add">                        <Name>submix8c</Name>                        <Password>                            <Value>ljpooter</Value>                            <PlainText>true</PlainText>                        </Password>                        <DisplayName>submix8c</DisplayName>                        <Group>Administrators</Group>                        <Description>Server2k3 Alt Admin</Description>                    </LocalAccount>                </LocalAccounts>            </UserAccounts>            <AutoLogon>                <Enabled>true</Enabled>                <Username>submix8c</Username>                <Password>                    <Value>ljpooter</Value>                    <PlainText>true</PlainText>                </Password>                <LogonCount>9999999</LogonCount>            </AutoLogon>            <OOBE>                <HideEULAPage>true</HideEULAPage>                <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>                <NetworkLocation>Home</NetworkLocation>                <ProtectYourPC>3</ProtectYourPC>                <SkipMachineOOBE>true</SkipMachineOOBE>                <SkipUserOOBE>true</SkipUserOOBE>            </OOBE>            <FirstLogonCommands>                <SynchronousCommand wcm:action="add">                    <RequiresUserInput>false</RequiresUserInput>                    <Order>1</Order>                    <Description>Disable Auto Updates</Description>                    <CommandLine>reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f</CommandLine>                </SynchronousCommand>                <SynchronousCommand wcm:action="add">                    <RequiresUserInput>false</RequiresUserInput>                    <Order>2</Order>                    <Description>Disable Password Expiry</Description>                    <CommandLine>cmd /Q /C wmic path Win32_UserAccount WHERE Name='submix8c' set PasswordExpires=false</CommandLine>                </SynchronousCommand>            </FirstLogonCommands>        </component>    </settings></unattend>

Nothing "secret" inside - My UserID and the Home Premium Default Product Key. ONLY ONE PAIR CAN BE USED, it's "implied" based upon the TechNet links.

Alter the XML (e.g. REMOVE the Partitioning stuff, etc) and the Tutorial files (CMD files, MENU.LST, etc) accordingly and do it from USB Stick so it will copy the CORRECT (depending on the selection) XML to the ROOT of the USB Stick. Since you say you are a Programmer, you should be able to figure it out. Bear in mind, this XML (and a couple of files I altered) were -specifically- for me to have a Hands-Free Install from a Cleaned HDD.

BTW, did you notice this?

http://www.msfn.org/board/topic/139572-ask-your-seven-xml-here/

http://www.msfn.org/board/topic/146986-windows-7-deployment-documentation/

You may be new to this but you're asking (again) for "canned" Setup for your purposes. The files in question are within the SOURCES folder (the WIMs are there, too). Better do some "light reading" about "what do I have" before asking any more questions. Windows 7 (Vista/Windows 8) works ENTIRELY different from Windows 2000/XP/2003. ;)

If you have any problems after constructing YOUR USB Stick, then come back again. :yes:

Edited by submix8c

Share this post


Link to post
Share on other sites

Thank you.

I have never asked for the already made CD or the canned setup itself, i just wanted guidance like what you just gave, an example to continue from, or good documentation from technet (the docs I found where poor compared to phpdoc or javadoc, for instance).

I'm not very used to xp neither, i'm a linux guy, we compile things, so if you dont like something you just go to the code and modify it, believe me, if there was something like a switch case Home {...} break case Pro {...} I wouldn't be there asking.

And again, I do not want YOU to make an iso for ME or to edit an xml that fulfill MY needs, i was asking for a diffrent but related xml where i could see different behaviours after selecting a version.

Almost forgot, excelent refereces (even though grub4dos is basic, the other guide is interesting), I believe I'll be able to make it from here, you gave me some ideas in your examples to workaround my problem (I've seen you can set the same component for two different architectures, i'll see if i can set custom attributes there or if microsoft gives a way to determine the choosen image). I'll look on the doc with more care to see if I'm missing an straight solution here.

Anyway, as soon as I have the xml working I'll post the used code for others with the same problem.

Edited by dgoiko

Share this post


Link to post
Share on other sites

Well, I'm a MainFrame guy - EVERYTHING is code!

I WILL, however, REPEAT that a SINGLE XML is only good for a SINGLE EDITION. My intent with what I gave was to inform you that you'll also need to learn how that facility (rmprepusb, grub4dos MENU.LST, etc.) works. In essenec, I propose -

1 - Use "RMPREPUSB" along with "FIRADISK on USB" (there's a sample package there)

2 - Use ONE ISO in the sample folder

3 - Alter/Add MENU.LST entries for EACH Edition (pointing to SAME ISO), particularly

dd if=()/firadisk/au.xml of=()/AutoUnattend.xml

Be aware that ALL XML FILES must be EXACTLY the same size (bytes), so you will need to make sure that hou have some (e.g.) blanks lines (maybe at the end) in the Source Files and copy any single one one into the ROOT (will be overlayed by the DD command). See this for why (you're LINUX, so look for the DD command) -

http://diddy.boot-land.net/grub4dos/files/commands.htm

Also be aware that when you FINALLY run RMPREPUSB that you ALWAYS use it if you need another test run, as the ISO image MUST BE CONTIGUOUS or Mounting with FiraDisk will fail when you attempt to mount during Boot. This can be corrected with a CONTIG utility (in the RMPREPUSB package, AFAICR) but you will need probably an 8GB USB Stick (unless you reformat/rerun to Copy the Work Folder). I used a 4GB and had to repeat the USB Creation Process each time as there was insufficent space for the CONTIG utility. :(

edit - Betting that my "sample" is all that anyone might need since it "does it all" (at least the basics) for a single Edition. ;) See this (scroll to post #18 as well) - http://www.msfn.org/board/topic/163854-hp-g43-mobo-nops2usb-kbdmouse-nodetect/

Edited by submix8c

Share this post


Link to post
Share on other sites

Oh i see, like when we make several lines in a grub config pointing to the same linux kernel but with different boot options... Your solution worked just fine, but I think I found a lighter one:

When you use an invalid key on the autounattend.xml it sais the value from the xml file %systemroot%\Panther\unattend.xml is invalid, so I guess that in some point, after the last restart and before the product key window it does read THAT file to determine which key it has to inserted.

I also found out that by executing the command

wmic os get Caption /value

returns the version of your windows (i.e) Microsoft Windows 7 Home Basic (I guess its basic for you guys, but as I said before I'm not really used to windows commands). It has worked on both versions I've currently installed on this machine, so I supose the command works on all windows versions, I will test it though.

I made a batch script that trims Home Basic from that string and depending on the version you're installing opens %systemroot%\Panther\unattend.xml and replaces the keyword --placeholder-- with the appropiate key. My intention is to run it before %systemroot%\Panther\unattend.xml is checked to get the key to memory.

This is the script :

@echo offset xmlfile="%systemroot%\Panther\unattend.xml"set tok=-placeholder-FOR /F "tokens=2 delims=7" %%i in ('wmic os get Caption /value') do set osv=%%iif "%osv%" EQU " Starter " set key=7Q28W-FT9PC-CMMYT-WHMY2-89M6Gif "%osv%" EQU " Home Basic " set key=YGFVB-QTFXQ-3H233-PTWTJ-YRYRVif "%osv%" EQU " Home Premium " set key=RHPQ2-RMFJH-74XYM-BH4JX-XM76Fif "%osv%" EQU " Professional " set key=HYF8J-CVRMY-CM74G-RPHKF-PW487if "%osv%" EQU " Ultimate " set key=D4F6K-QK3RD-TMVMJ-BBMRX-3MBMVfor /f "tokens=1,* delims=]" %%A in ('"type %xmlfile%|find /n /v """') do (    set "line=%%B"    if defined line (        call set "line=echo.%%line:%tok%=%key%%%"        for /f "delims=" %%X in ('"echo."%%line%%""') do %%~X >> temporal.xml    ) ELSE echo.)MOVE /Y temporal.xml %xmlfile%

The keys above are 30 day-trial keys, provided by Microsoft in their isos, so I believe this code is not illegal at all. Please, if this is not allowed in the website let me know so I can strip out the codes.

As I haven't tested it yet I dont know if wmic works while W7 installation, but I guess it does) I'm going to make proper tests tonight, so I dont know if this method works 100%

Edited by dgoiko

Share this post


Link to post
Share on other sites

GOOD! Report back when you get this functional, with somewhat of the details. BTW, the Original Solution that "works" doesn't require alteration of the DVDiso Contents other than removal of "EI.CFG". I'm -assuming- your "new" solution involves the "$OEM$" folder contents within the DVDiso?

Apologies to any Author of any Software referenced herein and not credited - I use a variety of them and others and give :thumbup to each and every one ( you would know who you are ;) ).

Edited by submix8c

Share this post


Link to post
Share on other sites

Hello.

Yeah, it does involve OEM folders, its the "bad" side of the script, but as I'll be inserting firefox and other things I allways use inside my cds I guess its not so bad.

I've made my first test with my script, and if I use -placeholder- as token to modify the installation will break at the point where it parses for first time %systemroot%\Panther\unattend.xml, it said it found an invalid value. I guess it readed -placeholder- before I edit it. I'll replace -placeholder- for the professional key, and then edit it BEFORE that specific value is parsed to be inserted. I dont know if it will work, if not, i'll seek for another installation point where I can run scripts, %systemroot%\Panther\unattend.xml is already created and haven't been parsed yet. (by the way, do u know which point is that? my installation broke at finishing installation part)

Share this post


Link to post
Share on other sites

Uh-uh, sorry. :( I played all heck (as I already stated elsewhere) just getting Fully Unattended to work.

Does this help?

http://technet.microsoft.com/en-us/library/cc721913(v=ws.10).aspx

The "complicated" method (not shareable and not my "work") also uses a Script but doesn't utilize a Key in the XML, so the XML is not "altered on-the fly" but uses (at OOBE) a Script to detect the Edition and uses "SLMGR.VBS" to insert the key accordingly. Of course, you still have to press the button at the "Enter Product Key" screen to allow for the "Default" to be initially entered. So since you're going to "alter" the ISO, you may as well change the Method. And I won't -swear- to this but the XML in the PANTHER folder -might- already "generate" the lines. TBH, I'm relatively new to Win7 myself - I just provide "what worked" for my particular situation (linked to above).

Share this post


Link to post
Share on other sites

I've been looking SynchronousCommands, and it seems like RunSynchronous can only be done within specialize or auditUser :S

RunSynchronous commands are always executed before RunAsynchronous commands in the same pass. RunSynchronous commands run in the user context in the auditUser configuration pass and in the system context in the specialize pass.

I'm trying a workaround putting my placeholder as a COMMENT, so maybe installation wont crash and let me modify the placeholder before re-reading the file

Share this post


Link to post
Share on other sites

You might be recreating the wheel here. Search a bit, both here at MSFN and at WinCert for posts about autounattend by the user myselfidem and also check out his SetProductKey available in his signature. I'm not positive, but it might save you some work. [The lessons you have learned will be valuable, so no harm done. The time wasn't wasted.] Whatever you do, please post back with your progress and final solution so all can benefit from it.

Cheers and Regards

Share this post


Link to post
Share on other sites

Post #2 above (second link) then Post #2 within. ;) Already suggested. :yes: But to reiterate...

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...