41

I want to sell a pc and have reinstalled Windows 10 and afterwards I installed the correct GPU driver. Now I want to reset the pc so when it gets turned on the next time the windows first-time configuration comes up, but the already installed GPU driver should NOT be removed. I know that this is possible and have done it multiple times already, but I don't remember the command and can't find it anywhere.

glglgl
  • 1,449
  • 11
  • 23
QuesterDesura
  • 724
  • 6
  • 11
  • 13
    This is a really confusing title, since hitting the reset button of a PC doesn't delete files. – David Richerby Apr 08 '19 at 17:03
  • I don't think so. If you search for 'reset pc', then you won't find a single answer, that will not explain you how to reset your windows installation to factory defaults, thus removing all installed applications. As found here: https://support.microsoft.com/en-us/help/17085/windows-8-restore-refresh-reset-pc "Reset your PC to reinstall Windows but delete your files, settings, and apps—except for the apps that came with your PC. " – QuesterDesura Apr 08 '19 at 18:40
  • 1
    @QuesterDesura Win10 actually has a reset that should preserve drivers, but that's quite different from the OOBE you're looking for. – Bob Apr 09 '19 at 04:27
  • @Bob _Where are you getting your information from, as it's factually incorrect._ Using Windows 10's Reset functionality removes all user accounts and files, booting to OOBE upon completion. It appears you may be confusing "Refresh" with "Reset" and can view screenshots of the entire Reset procedure, showing it booting to OOBE here: [How to: Perform a clean install using Reset this PC in Windows 10](https://answers.microsoft.com/en-us/windows/forum/windows_10/how-to-perform-a-clean-install-using-reset-this-pc/6f6335fc-8d15-4598-af16-033d1d8c16bf?auth=1) – JW0914 Apr 14 '19 at 11:53
  • @JW0914 Oh, I don't know, perhaps [the official documentation](https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/how-push-button-reset-features-work)? I am most certainly not confusing *refresh*, which *does not exist in Windows 10* (rather, it was folded into "reset"). That said, the actual preservation of drivers is somewhat more complex (you'd need an in-place upgrade first to "lock" the drivers in) and, again, not what the asker was looking for here, hence the comment instead of an answer. – Bob Apr 14 '19 at 14:42
  • @Bob, Your comment implies a Reset does not boot to OOBE, which it does _(the only other mode it could boot to is Audit)_, and is why your statement is factually inaccurate. If you'd like to verify, the link in my comment provides screenshots showing this. – JW0914 Apr 16 '19 at 10:58

2 Answers2

61

After searching for a whole hour I found the solution: sysprep.

Enter this is in the command line and it will shutdown your PC after confirming. The next time you start your PC it will look like a fresh install.

Kamil Maciorowski
  • 69,815
  • 22
  • 136
  • 202
QuesterDesura
  • 724
  • 6
  • 11
  • 5
    A fresh install doesn't come with the GPU driver, what does the command do, then? – Aritz Apr 08 '19 at 06:12
  • @XtremeBiker https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--generalize--a-windows-installation – ErikE Apr 08 '19 at 06:37
  • 5
    It will look like a fresh install(out-of-box experience - OOBE) when you power on the PC again, but the installed software/drivers will still be there after doing the "first time startup" configuration. The link from @ErikE links to a specific option of sysprep "Generalize", but it is optional. The general command is described here: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep-process-overview – QuesterDesura Apr 08 '19 at 08:03
  • 2
    **This is _not_ the way to reset Windows** and will lead to issues depending on what 3rd party software licenses the user has. [SysPrep](https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--generalize--a-windows-installation) is used to generalize a Windows install to allow imaging of the install for cloning to workstations, VMs, etc., removing machine specific IDs from the Windows install, including drivers (also problematic since certain drivers, such as chipsets, must be installed prior to any other drivers or Windows Updates). Correct way: `systemreset -cleanpc` – JW0914 Apr 13 '19 at 19:49
  • Again, the `sysprep` command only generalizes the pc when an additional parameter `/generalize` is given, it is entirely optional to remove machine specific IDs(https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep-command-line-options). Please actually read the documentation before spreading false information. `systemreset -cleanpc` will not lead to the desired behavior as described in the question. – QuesterDesura Apr 28 '19 at 18:17
  • @QuesterDesura The reason why your solution of using SysPrep is not the correct way to do this is that it defeats what you're trying to accomplish. While the system will reboot to OOBE with your GPU driver installed, if the new owner performs a reset at any point prior to taking the next major Windows update (April / October), that driver will be removed. Since it's good security practice to perform a Reset on any used PC one buys, then all your work could be for naught. – JW0914 Apr 30 '19 at 13:41
  • @JW0914 This Thread is about my question and your answer does NOT answer my question. You cannot simply answer what you had like the question to be. Systemreset -cleanpc DOES delete files, what I'm trying to avoid. The question clearly states that I'm looking for a command that will NOT delete any files. Systemreset will delete applications or even personal files depending on the arguments. Your answer is wrong and does not what I have asked for and hence I'm down voting it. – QuesterDesura May 01 '19 at 09:04
  • @QuesterDesura You stated _"Now I want to **reset** the pc so when it gets turned on the next time the windows first-time configuration comes up, but the already **installed GPU driver should NOT be removed**."_ You seem to be unclear on what you're actually looking for, as your previous comment completely contradicts what you asked in your question. Additionally, please explain how my answer is wrong in the comment section _under my answer_ so that if something contained within my answer is indeed wrong, then I can correct that, which is what should be done when downvoting any answer. – JW0914 May 01 '19 at 12:51
  • No it is completely clear "What is the command to reset a Windows installation without deleting any files" and your answer does not fit that requirement nor your comment under this answer. I'm commenting here because your comment spreads wrong information. `Sysprep` does not generalize anything unless specified. `systemreset -cleanpc`will delete files and hence is also not the correct answer that I was looking for. – QuesterDesura May 01 '19 at 20:33
  • @QuesterDesura You appear to be selectively reading... I'm not sure how much more concise I can be regarding a process you appear to have a fundamental misunderstanding of. I would encourage taking the time to read the Microsoft documentation regarding what you're looking to achieve, as I've parsed exactly what Microsoft states on their Docs site. If you Sysprep a Windows 10 install, that does not move the GPU driver to WinSxS & you specifically asked how to Reset a Windows 10 install. Perhaps it would be prudent to re-read what you asked, as continued contradictions are a hindrance. – JW0914 May 02 '19 at 02:47
0

This shouldn't be necessary, as Windows 10 will auto install all WHQL drivers required by the hardware upon running Windows Update (exception is Chipset drivers)


The only way to ensure the GPU driver is permanently included (in this scenario) is to:

  1. Install a previous version of Windows 10 (v1809, v1803, etc.)
  2. Install the GPU driver
  3. Update to v1903 (any version newer than one installed)
  4. Perform a Reset via:

    • CLI:

      systemreset -cleanpc
      


    • GUI:
      • Settings > Update & Security > Recovery > Reset this PC

    • Recovery:
      • Click the Power Button, hold down SHIFT and select Restart
      • Once Recovery Menu loads, select Troubleshoot, then Reset your PC


ScreenShots: HowTo: Perform a clean install using Reset this PC in Windows 10

JW0914
  • 7,052
  • 7
  • 27
  • 48
  • 1
    If downvoting an answer, perhaps one could consider commenting as to what's incorrect in the answer. All information in this answer came directly from Microsoft's Docs site – JW0914 Apr 30 '19 at 13:46