Jump to content

Is there a way to install w7 to an existing system


Recommended Posts

Hi i have made an unattended windows 7, but i select manually the drive where the operating system will be installed because i am afraid of deleting some data. this is why i have commented the diskconfiguration in my autounattended

            <!-- <DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Extend>true</Extend>
<Order>1</Order>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Extend>false</Extend>
<Format>NTFS</Format>
<Letter>C</Letter>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
<WillShowUI>OnError</WillShowUI>
</DiskConfiguration> -->

for a long time i am wondering if there is a batch or something to do in order that the unattended detects the drive of the older system operating and then install the unattended automatically over that drive.

for example we assume a disc with 2 logical discs C: and D:

C:\ is the drive where is installed the older operating system

D:\ there are data.

I would like that my unattended detects that the older system is installed on C:\ and then format it automatically in order to in install the unattnded in C:\ also automatically. and leave intact D:

Link to comment
Share on other sites


The Autounattend.xml can't do what you want. You'll need to use a programming or scripting language... or maybe even batch. You'll have to change the winpeshl.ini on the DVD to run your app/script instead of setup.exe. So you will need to determine what to be looking for... probably searching for a Windows folder, but remember that WinPE might not see the OS volume as C: every time.

Link to comment
Share on other sites

Thats why I always use the below cause I don't want my data drive wiped out. If you going to do this 1 time then this will be the answer.

                        <DiskConfiguration>
<WillShowUI>Always</WillShowUI>
</DiskConfiguration>

Link to comment
Share on other sites

Question for everyone: Does the default boot.wim have the script host package and powershell already or does it need to be modified first ?

If anyone is interested in scripting it, try using windowsPE pass to check the Win32_Volume BootVolume flag.

Here is a powershell snip to return the correct drive letter.

$CDrive = Get-WmiObject -class Win32_Volume | where-object {$_.BootVolume -eq "True"} | Select-Object DriveLetter

$CDrive = $CDrive.DriveLetter

$CDrive

Edit: second line cleans up variable, removing useless formatting.

Edited by MrJinje
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...