Jump to content

Unattended install of Windows 7 on existing partition


Recommended Posts

Hi,

Once again thanks alot for the information and Thanks to Urie as well for neat formatting (I am using Notepad++ as editor). I am trying this on Virtual machine. Does it make any difference?

I am attaching the Autounattend.xml here... Please help....

NOTE:

The XML code pasted in my previous post is same as the XML file attached.

Edited by DineshBhat
Link to comment
Share on other sites


I've tried successfuly an "Autounattend.xml" (like yours) but with "Windows AIK for Windows 7"! Test made with "Sun VirtualBox" virtual machine.

I've just add some lines inside "Autounattend.xml"!

I've tested for Windows 7 ULTIMATE but I give you as attachment for "Windows 7 ENTERPRISE"!

I've used oscdimg.exe manually to create the ISO file like this:

oscdimg.exe -h -u2 -m -bc:\Win7\boot\etfsboot.com -lWin7 c:\Win7\ c:\Win7.iso

Works perfectly!

*Edit: Autounattend.xml (example / same as attachment)):


<?xml version="1.0" encoding="utf-8"?>
<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>
<UserLocale>en-US</UserLocale>
<UILanguage>en-US</UILanguage>
<SystemLocale>en-US</SystemLocale>
</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">
<UserData>
<Organization>TEST</Organization>
<FullName>test</FullName>
<AcceptEula>true</AcceptEula>
</UserData>
<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">
<Active>true</Active>
<Format>NTFS</Format>
<Label>system</Label>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Format>NTFS</Format>
<Label>Main</Label>
<Letter>C</Letter>
<Order>2</Order>
<PartitionID>2</PartitionID>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows 7 ENTERPRISE</Value>
</MetaData>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>2</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
</component>
</settings>
<settings pass="oobeSystem">
<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">
<AutoLogon>
<Password>
<Value>c</Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>1</LogonCount>
<Username>Administrator</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
</OOBE>
<UserAccounts>
<AdministratorPassword>
<Value>c</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
</UserAccounts>
</component>
</settings>
<settings pass="specialize">
<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>test</ComputerName>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:C:/win7/sources/install.wim#Windows 7 ENTERPRISE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

*Edit: Unattented Windows Setup Reference for Windows 7

InstallToAvailablePartition

The InstallToAvailablePartition setting specifies whether to install the Windows operating system to the first available partition that has enough space and does not already contain an installation of Windows.

If you are installing Windows to a blank disk, you must create and format partitions with the CreatePartitions and ModifyPartitions settings, and set one of the partitions as the active partition. After the partitions are created and formatted, using the InstallToAvailablePartition setting will select the first available partition with enough space to install Windows.

Comparison of OSImage Settings: InstallTo and InstallToAvailablePartitionFor unattended installations, you must specify either the InstallTo setting or the InstallToAvailablePartition setting.

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo = Installs Windows to a specified disk and partition.

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallToAvailablePartition = Installs Windows to the first available partition that has enough space and does not already contain an installation of Windows.

Note:

In the OSImage setting, if you set the InstallToAvailablePartition setting to true, do not set the InstallTo setting.

If both of these settings are set, and if the WillShowUI setting is set to Never, then an error is logged, and installation is terminated.

Values

true

Specifies that Windows be installed to the first available partition with enough space.

Windows Setup searches for available partitions starting with disk 0 and partition 1 on the first disk and continuing through all available disks.

false

Specifies that the Windows partition will be specified, by using the Unattend setting: Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo.

This is the default value.

Edited by myselfidem
Link to comment
Share on other sites

Hi,

Thanks alot for your dedicated valuable time for me. I have used the XML file attached (by you) and got to see the problem solved.... :) .... And Now I know the mistake in my code (XML).

I have missed (deleted) the line. I have deleted the line by having an assumption that, the code written <InstallTo> </InstallTo> takes care of identifying the necessary settings.


<InstallToAvailablePartition>false</InstallToAvailablePartition>

and this made me struggle like this :( ....

I would like to thank all the people who helped me to get ride of this issue.

-- Dinesh

Link to comment
Share on other sites

Hi,

Thanks alot for your dedicated valuable time for me. I have used the XML file attached (by you) and got to see the problem solved.... :) .... And Now I know the mistake in my code (XML).

I have missed (deleted) the line. I have deleted the line by having an assumption that, the code written <InstallTo> </InstallTo> takes care of identifying the necessary settings.


<InstallToAvailablePartition>false</InstallToAvailablePartition>

and this made me struggle like this :( ....

I would like to thank all the people who helped me to get ride of this issue.

-- Dinesh

Fine. Thanks a lot! :rolleyes:

Edited by myselfidem
Link to comment
Share on other sites

Hi,

Thanks alot for your dedicated valuable time for me. I have used the XML file attached (by you) and got to see the problem solved.... :) .... And Now I know the mistake in my code (XML).

I have missed (deleted) the line. I have deleted the line by having an assumption that, the code written <InstallTo> </InstallTo> takes care of identifying the necessary settings.


<InstallToAvailablePartition>false</InstallToAvailablePartition>

and this made me struggle like this :( ....

I would like to thank all the people who helped me to get ride of this issue.

-- Dinesh

You can also download XML Notepad 2007 from microsoft it will help with formatting xml files.

Link to comment
Share on other sites

  • 6 months later...

Hey, I have the same problem than Dilesh, except that I am want to install Windows 7 Ultimate (x64) 64 bits. I am curruntly running on Windows Vista (x64) 64 bits.Can you post another file but with my requirements please? I know nothing about programming so I can't really modify the file you posted online.

Thanks again

I've tried successfuly an "Autounattend.xml" (like yours) but with "Windows AIK for Windows 7"! Test made with "Sun VirtualBox" virtual machine.

I've just add some lines inside "Autounattend.xml"!

I've tested for Windows 7 ULTIMATE but I give you as attachment for "Windows 7 ENTERPRISE"!

I've used oscdimg.exe manually to create the ISO file like this:

oscdimg.exe -h -u2 -m -bc:\Win7\boot\etfsboot.com -lWin7 c:\Win7\ c:\Win7.iso

Works perfectly!

*Edit: Autounattend.xml (example / same as attachment)):


<?xml version="1.0" encoding="utf-8"?>
<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>
<UserLocale>en-US</UserLocale>
<UILanguage>en-US</UILanguage>
<SystemLocale>en-US</SystemLocale>
</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">
<UserData>
<Organization>TEST</Organization>
<FullName>test</FullName>
<AcceptEula>true</AcceptEula>
</UserData>
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition>
<Order>1</Order>
<Type>Primary</Type>
<Size>100</Size>
</CreatePartition>
<CreatePartition>
<Order>2</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Label>system</Label>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Format>NTFS</Format>
<Label>Main</Label>
<Letter>C</Letter>
<Order>2</Order>
<PartitionID>2</PartitionID>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows 7 ENTERPRISE</Value>
</MetaData>
</InstallFrom>
<InstallToAvailablePartition>false</InstallToAvailablePartition>
<WillShowUI>OnError</WillShowUI>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>2</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
</component>
</settings>
<settings pass="oobeSystem">
<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">
<AutoLogon>
<Password>
<Value>c</Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>1</LogonCount>
<Username>Administrator</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
</OOBE>
<UserAccounts>
<AdministratorPassword>
<Value>c</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
</UserAccounts>
</component>
</settings>
<settings pass="specialize">
<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>test</ComputerName>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:C:/win7/sources/install.wim#Windows 7 ENTERPRISE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

*Edit: Unattented Windows Setup Reference for Windows 7

InstallToAvailablePartition

The InstallToAvailablePartition setting specifies whether to install the Windows operating system to the first available partition that has enough space and does not already contain an installation of Windows.

If you are installing Windows to a blank disk, you must create and format partitions with the CreatePartitions and ModifyPartitions settings, and set one of the partitions as the active partition. After the partitions are created and formatted, using the InstallToAvailablePartition setting will select the first available partition with enough space to install Windows.

Comparison of OSImage Settings: InstallTo and InstallToAvailablePartitionFor unattended installations, you must specify either the InstallTo setting or the InstallToAvailablePartition setting.

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo = Installs Windows to a specified disk and partition.

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallToAvailablePartition = Installs Windows to the first available partition that has enough space and does not already contain an installation of Windows.

Note:

In the OSImage setting, if you set the InstallToAvailablePartition setting to true, do not set the InstallTo setting.

If both of these settings are set, and if the WillShowUI setting is set to Never, then an error is logged, and installation is terminated.

Values

true

Specifies that Windows be installed to the first available partition with enough space.

Windows Setup searches for available partitions starting with disk 0 and partition 1 on the first disk and continuing through all available disks.

false

Specifies that the Windows partition will be specified, by using the Unattend setting: Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo.

This is the default value.

Link to comment
Share on other sites

Install WAIK for Windows 7!

You can just delete the last line and change to am64:

Delete:

<cpi:offlineImage cpi:source="wim:C:/win7/sources/install.wim#Windows 7 ENTERPRISE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />

Change to "amd64":

<component name="Microsoft-Windows-Setup" processorArchitecture="amd64 publicKeyToken=......

You can also use WSIM to check your "Autounattend.xml"!

*Edit 1: I hope that can help you habsfan!

J'espère que cela t'aidera!

*Edit 2: If you need more help, you can find documentation here (and just choose the French language if you need with Microsoft Documentation links):

Windows 7 Deployment Documentation

Bienvenue dans le forum! ;)

Edited by myselfidem
Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...