Jump to content
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. ×

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">
<CreatePartition wcm:action="add">
<ModifyPartition wcm:action="add">
</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.


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


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

Edited by MrJinje
Link to comment
Share on other sites

I don't think it has PowerShell. iirc, only WinPE 4 (a Windows 8 boot.wim) can add PowerShell3 to it. I doubt adding the PowerShell package in the ADK to a Windows 7 boot.wim is supported but who knows if it would actually work!

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...