Jump to content

Is it possible to Repair Install from a HDD? Yes it is.


Recommended Posts

Posted (edited)

Has anyone ever attempted this?

DETAILS: Most people are aware of the 'Repair Install' technique since Vista. It involves this ...

- Boot the working Windows computer into an Administrator account (in a normal fashion *not* SAFEMODE)

- Disable firewall and antivirus, and non-essential processes.

- Insert Windows Setup media (DVD or USB), it will Autorun 'SETUP.EXE'

... and eventually you perform the Upgrade choice.

This 'Repair Install' (also called 'In-Place Install' or 'In-Place Upgrade' at Microsoft sites) is detailed on many webpages but especially at Windows SevenForums which has a good tutorial that many of the Microsoft threads link back to. What I am wondering is if anyone has tried the following:

- Boot Windows, login as Administrator, disable firewall etc.

- Copy the Windows Setup DVD (or extract an official ISO) to a folder on the computer in a different partition.

- Execute the SETUP.EXE directly (ex: D:\Win7dvd\Setup.exe).

The goal here is to bypass the excruciatingly slow optical drives (and dodgy media) or flaky thumbdrives.

This is approximately what we used to do in Win9x to add/remove components (I don't mean 'clean install' from HDD, that was simple in Win9x but impossible ever since, I believe). I mean running SETUP live from within Windows from the copied CDROM on the HDD.

Anyway, I just can't think of a good reason it shouldn't work in Vista/7 except that perhaps some genius might have coded a strange check that the media is 'removable'. Making things easy for us has not been the primary concern of late.

BTW: the SP0 or SP1 must of course match. Win7 is at SP1 obviously and most physical media delivered with the computers was SP0. It seems silly to burn the official SP1 refreshes (or worse, slipstream SP1 and then burn) *and* then insert the burned media to do a repair *if* we can just extract the thing in the first place and execute the raw files natively from a HDD, bypassing the burning completely since we do not even need a bootable DVD for this process. Sounds logical to me.

IMHO, this technique will become more important as more distribution evolves to digital downloads rather than optical. While there are definitely SP1 Retail and OEM discs for Windows 7, there is a strong possibility there may never be a SP2 physical media at all (well depending on how bad Win8 tanks I guess :-)

Edited by CharlotteTheHarlot

Posted

I think it would be possible if you had a dual boot, but the problem would be that the processes that is running setup.exe would not be able to replace themselves during the repair.

Posted

I think it would be possible if you had a dual boot, but the problem would be that the processes that is running setup.exe would not be able to replace themselves during the repair.

Well, for a 'repair install' they actually can replace any file because the setup process appears to temporarily modify the boot loader in order to achieve the trick of "Windows will restart several times during Setup and continue the process..." which is pretty much the same thing it does during a full install. It does this multiple times actually and manages to pick up exactly where it left off each time. So in a 'repair install' for files that are in use they apparently just do something along these lines ...

- queue the in-use files for next-boot replacement

- alter the bootloader to restart and then branch back to the setup script

- restart, install and replace files

- continue with script

Of course the main difference between full and repair is the fact that during a 'repair install' thousands of files are already physically present and many are actively in use in memory and locked on disk. It is an impressive feat of coding to be sure.

But I never liked doing this 'repair' procedure from the DVD. Never. The mechanics of the optical drive can be flaky, it can be dirty, the media is easily damaged, and ATAPI devices have legendary problems with vanishing from Windows for no reason. Flashdrives are probably better but come with their own sets of problems, more dependencies (BIOS support, Windows drivers, damage from dropping, ...) but it is no doubt better. I guess I am really old school since I prefer native HDD execution whenever possible.

So, one area for improvement in the Vista/7 era should have been an option to install the setup files somewhere on a HDD partition and add "repair" to the startup options. Think of it as a super recovery console (which can be installed of course, even the incredible DaRT packages can be installed and added as a bootup option and executed from the local HDD). When a service pack is later applied it should automatically update the local setup files on the HDD to make repair installs simple. This is vaguely how the current SFC works but it is far less comprehensive.

NOTE: since this isn't one of my personal systems I am purposely confining myself to the legal public methods with non-commerical software. It is a customer PC which was badly infected. Believe me, it would be much simpler to boot into DaRT and quickly destroy the problems than using linux boot discs and the 3rd party variations they offer (needless to say I am of the opinion that all the DaRT and related tools should have been made available to every Windows owner but that's another issue. :realmad: )

Anyway, I am preparing to try this later today or tomorrow and will report back. First I have to complete a few more scans for the removal of all the virus and spyware hijacks. Then I will run the in-place 'repair install' executed from a separate partition. In addition to reverting core system files to Win7sp1, this should also rebuild the registry and all the ACL's that were modified and tangled. I note for the record that both Norton 360 and later McAfee were in use here and failed again. Big surprise.

Posted

Okay. The answer is YES, you can run the setup files from a HDD and do a Repair Install.

Just to recap, the computer was very unstable from some aggressive malware. Even after cleaning, many problems continually showed up, for example being unable to do all Windows Updates (most obnoxiously MSIE would not update to version 9) and many FAILs showed in the history. The event log was its usual un-useful self having wiped out the key entries thanks to it's brilliant FIFO strategy. The physical CBS and related logs kept steering me to problems in the Software Distribution folder but even renaming and other tricks wouldn't free the log jam. Norton and McAfee having been used in the past likely caused problems because they usually alter ACL's on folders and registry keys to 'protect' the user from himself and even though their special removal tools do an excellent job at wiping away the application suites and most of the damage, there is no real way to be certain that permissions were also reset. I also noted that SFC was failing on a couple of files (just WMP junk really) so the plan became to Repair Install. This would result in a kind super-SFC setting all files to a known official level, SP1 to be exact. It also gives the benefit of a completely new registry, but one with all previous settings maintained.

The computer used a 600 GB SATA set up by Dell with their usual three partition scheme C: and D: and Hidden.

C: ......... 581 GB ... System

D: ......... 015 GB ... Recovery

(hidden) ... 070 MB ... Restore

Fortunately the D: Recovery Partition had plenty of free space on it to be able to fit the approximately 3.2 GB required to hold the extracted Win7 x64 SP1 setup files. This is good news for those that deal with these cookie cutter Dell computers since we can now quickly just copy the Windows Setup files without having to resize partitions or delete some of the distribution images, drivers or crapware also found on the D: partition. I chose to just leave the original Win7 SP0 + crapware and other material in place, but if it were my personal computer I would have long ago wiped that partition (and the restore partition as well) because I would not be caught dead doing a factory reset.

So it was a simple matter of extracting an official Win7 SP1 ISO to a new folder on the D: partition. I then did an ATTRIB to clear all the attributes (probably an optional step but one I have always done).

I then did a semi-clean boot to the built-in Administrator account (which you'd have to enable it if you didn't already) by disabling all the unnecessary startup items (printer junk, WMP, etc) and services (iTunes, Google, AOL) and completely killing other startup stuff like Google, Yahoo, Java, Adobe updaters and maybe a dozen others (ridiculous isn't it?). A truly proper clean-boot would involve MSCONFIG and a selective startup disabling everything except Microsoft drivers and services, but I just went with instinct. For example I left things like Sidebar and Windows Search and some Windows Live junk in place in their autorun locations so I wouldn't forget to re-enable them later. Anyway, let's call it a pretty clean boot. So you are sitting in the built-in ADMINISTRATOR account ...

Then it was simple ... Start > Run > D:\Win7sp1\Setup.exe. Clicking through the choices just the same as if using the DVD and finally clicking on UPGRADE.

All in all it took about 90 minutes to complete the 'upgrade' repair including several reboots but at this point it is all unattended and the setup script successfully picks up where it left off each time it rebooted. Good job on this Microsofties. :thumbup

When it finally was completed and windows again started prompting for input, it did serve up the product key and activation screen (~sigh~ as if it couldn't easily determine the original code by itself!), but aside from that, every single previous setting was saved and restored correctly, from timezone to all user wallpapers and everything else. Even the printer drivers were still functional (so I hear from the customer) which I worried about since I had only the computer but no peripherals.

Most importantly, Windows Update worked correctly. After immediately doing the MSIE version 8 to 9 successfully there were another 70 (I believe) updates post-SP1 which also went okay. I also decided to just install MSE (Microsoft Security Essentials) rather than mess with a 3rd party. I doubt that MSE can really be any worse than the others.

Finally, about 1 GB of older files were placed into two folders ...

C:\$INPLACE.~TR

C:\WINDOWS.~Q

Which I eventually deleted. All is good.

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