none
Force user to enter product key RRS feed

  • Question

  • I have a problem with my unattend files for the sysprep (Windows 7 Pro x64).

    What I want  to do is to force the user just to enter the product key in the first boot.

    Now i have two unattend files. With one of those files Windows is just asking for the product key in the first boot.

    With the other one, the user must enter user name, Password and key.

    But, as I said, Windows should just ask for the key.

    This is the file which works:

    <?xml version='1.0' encoding='utf-8'?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    	<settings pass="generalize">
    		<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<DoNotCleanTaskBar>true</DoNotCleanTaskBar>
    		</component>
    		<component name="Microsoft-Windows-powercpl" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<PreferredPlan>8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c</PreferredPlan>
    		</component>
    		<component name="Microsoft-Windows-PnpSysprep" processorArchitecture="amd64" 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="amd64" 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-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
    			<ComputerName>*</ComputerName>
    			<RegisteredOrganization></RegisteredOrganization>
    			<RegisteredOwner></RegisteredOwner>
    			<DoNotCleanTaskBar>true</DoNotCleanTaskBar>
    			<TimeZone>W. Europe Standard Time</TimeZone>
    			<CopyProfile>true</CopyProfile>
    			<ShowWindowsLive>false</ShowWindowsLive>
    		</component>
    		<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<Home_Page>about:blank</Home_Page>
    			<DisableWelcomePage>true</DisableWelcomePage>
    			<DisableFirstRunWizard>false</DisableFirstRunWizard>
    		</component>
    		<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" 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">
    					<Description>EnableAdmin</Description>
    					<Order>1</Order>
    					<Path>cmd /c net user Administrator /active:yes</Path>
    				</RunSynchronousCommand>
    				<RunSynchronousCommand wcm:action="add">
    					<Description>UnfilterAdministratorToken</Description>
    					<Order>2</Order>
    					<Path>cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v FilterAdministratorToken /t REG_DWORD /d 0 /f</Path>
    				</RunSynchronousCommand>
    				<RunSynchronousCommand wcm:action="add">
    					<Description>disable user account page</Description>
    					<Order>3</Order>
    					<Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f</Path>
    				</RunSynchronousCommand>
    				<RunSynchronousCommand wcm:action="add">
    					<Path>cmd /c net accounts /maxpwage:unlimited</Path>
    					<Order>4</Order>
    					<Description>disable user passwd age</Description>
    				</RunSynchronousCommand>
    				<RunSynchronousCommand wcm:action="add">
    					<Order>5</Order>
    					<Path>cmd /c %SystemDrive%\power-config.cmd</Path>
    				</RunSynchronousCommand>
    			</RunSynchronous>
    		</component>
    		<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" 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>de-DE;0407:00000407</InputLocale>
    			<SystemLocale>de-DE</SystemLocale>
    			<UILanguage>en-US</UILanguage>
    			<UserLocale>de-DE</UserLocale>
    		</component>
    		<component name="Microsoft-Windows-SystemRestore-Main" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    			<DisableSR>1</DisableSR>
    		</component>
    	</settings>
    	<settings pass="oobeSystem">
    		<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
    			<AutoLogon>
    				<Enabled>true</Enabled>
    				<Username>myuser</Username>
    				<Domain>.</Domain>
    				<Password>
    					<Value>myuser</Value>
                        <PlainText>true</PlainText>
    				</Password>
    				<LogonCount>999</LogonCount>
    			</AutoLogon>
    			<FirstLogonCommands>
    				<SynchronousCommand wcm:action="add">
    					<CommandLine>cmd /c %SystemDrive%\postinstall.cmd</CommandLine>
    					<Description>configure System</Description>
    					<Order>2</Order>
    				</SynchronousCommand>
    				<SynchronousCommand wcm:action="add">
    					<CommandLine>cmd /c del %SystemDrive%\postinstall.cmd</CommandLine>
    					<Description>remove postinstall script</Description>
    					<Order>3</Order>
    				</SynchronousCommand>
    				<SynchronousCommand wcm:action="add">
    					<CommandLine>cmd /c del %SystemDrive%\power-config.cmd</CommandLine>
    					<Description>remove power-config script</Description>
    					<Order>4</Order>
    				</SynchronousCommand>
    			</FirstLogonCommands>
    			<OEMInformation>
    				<Logo>%WINDIR%\OEM-Logo.bmp</Logo>
    				<Manufacturer>mycompany</Manufacturer>
    				<Model>My Model</Model>
    				<SupportHours>Mo.-Fr. 8:00-17:00</SupportHours>
    				<SupportURL>http://www.mycompany.de/support.html</SupportURL>
    				<SupportPhone>+00 0000 0000-000</SupportPhone>
    			</OEMInformation>
    			<OOBE>
    				<HideEULAPage>true</HideEULAPage>
    				<NetworkLocation>Work</NetworkLocation>
    				<ProtectYourPC>3</ProtectYourPC>
    				<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
    				<SkipMachineOOBE>false</SkipMachineOOBE>
    				<SkipUserOOBE>true</SkipUserOOBE>
    			</OOBE>
    			<RegisteredOrganization></RegisteredOrganization>
    			<RegisteredOwner></RegisteredOwner>
    			<TimeZone>W. Europe Standard Time</TimeZone>
    			<DoNotCleanTaskBar>true</DoNotCleanTaskBar>
    		</component>
    		<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" 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>de-DE;0407:00000407</InputLocale>
    			<SystemLocale>de-DE</SystemLocale>
    			<UILanguage>en-US</UILanguage>
    			<UserLocale>de-DE</UserLocale>
    		</component>
    	</settings>
    	<cpi:offlineImage cpi:source="catalog://192.168.253.230/ds-win$/operating systems/windows ult 7 sp1 x64 en-us/sources/install_windows 7 ultimate.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi"></cpi:offlineImage>
    </unattend>

    And this is the one which is not working:

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="generalize">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
            </component>
            <component name="Microsoft-Windows-PnpSysprep" processorArchitecture="amd64" 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>
            </component>
    		<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" 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-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
                <ComputerName>*</ComputerName>
                <RegisteredOrganization></RegisteredOrganization>
                <RegisteredOwner></RegisteredOwner>
                <TimeZone>W. Europe Standard Time</TimeZone>
    			<ShowWindowsLive>false</ShowWindowsLive>
            </component>
            <component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <Home_Page>about:blank</Home_Page>
                <DisableWelcomePage>true</DisableWelcomePage>
                <DisableFirstRunWizard>true</DisableFirstRunWizard>
            </component>
            <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" 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">
                        <Description>disable user passwd age</Description>
                        <Order>1</Order>
                        <Path>cmd /c net accounts /maxpwage:unlimited</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Description>Settings for Powerplan</Description>
                        <Order>5</Order>
                        <Path>cmd /c %systemdir%\power-config.cmd</Path>
                    </RunSynchronousCommand>
                </RunSynchronous>
            </component>
            <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" 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>de-de;0407:00000407</InputLocale>
                <SystemLocale>de-de</SystemLocale>
                <UILanguage>en-us</UILanguage>
                <UserLocale>de-de</UserLocale>
            </component>
            <component name="Microsoft-Windows-SystemRestore-Main" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <DisableSR>1</DisableSR>
            </component>
        </settings>
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
                <AutoLogon>
                    <Enabled>true</Enabled>
                    <Username>myuser</Username>
                    <Domain>.</Domain>
                    <LogonCount>999</LogonCount>
                    <Password>
                        <Value>myuser</Value>
                        <PlainText>true</PlainText>
                    </Password>
                </AutoLogon>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>cmd /c %SystemDrive%\postinstall.cmd</CommandLine>
                        <Description>clean System boot</Description>
                        <Order>1</Order>
                    </SynchronousCommand>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>cmd /c del %SystemDrive%\postinstall.cmd</CommandLine>
                        <Description>remove postinstall script</Description>
                        <Order>2</Order>
                    </SynchronousCommand>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>cmd /c del %SystemDrive%\power-config.cmd</CommandLine>
                        <Description>remove power-config script</Description>
                        <Order>3</Order>
                    </SynchronousCommand>
                </FirstLogonCommands>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                    <NetworkLocation>Work</NetworkLocation>
                    <ProtectYourPC>3</ProtectYourPC>
                    <SkipMachineOOBE>false</SkipMachineOOBE>
                    <SkipUserOOBE>true</SkipUserOOBE>
                </OOBE>
                <RegisteredOrganization></RegisteredOrganization>
                <RegisteredOwner></RegisteredOwner>
                <TimeZone>W. Europe Standard Time</TimeZone>
                <OEMInformation>
                    <Logo>%WINDIR%\OEM-Logo.bmp</Logo>
                    <Manufacturer>mycompany</Manufacturer>
                    <Model>My Model</Model>
                    <SupportHours>Mo.-Fr. 8:00-17:00</SupportHours>
                    <SupportURL>http://www.mycompany.de/support.html</SupportURL>
                    <SupportPhone>+00 0000 0000-000</SupportPhone>
                </OEMInformation>
                <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
                <ShowWindowsLive>false</ShowWindowsLive>
            </component>
            <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" 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>de-de;0407:00000407</InputLocale>
                <SystemLocale>de-de</SystemLocale>
                <UILanguage>en-us</UILanguage>
                <UserLocale>de-de</UserLocale>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="catalog://192.168.253.230/ds-win$/operating systems/windows ult 7 sp1 x64 en-us/sources/install_windows 7 ultimate.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi"></cpi:offlineImage>
    </unattend>
    

    So which of those Settings makes the difference?

    Thank you

     

    Tuesday, July 17, 2018 1:01 PM

All replies

  • Hi,

    As far as I know, we always use the first xml file.

    Run sysprep with a answer file as parameter to modify the default user profile (use CopyProfile) and automate the OOBE phase (something like this: Sysprep /generalize /oobe /shutdown /unattend: F:\CustomOOBE.xml.

    Regards,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, July 18, 2018 6:15 AM
    Moderator