Fixing Windows Installation Problems With Command-Line Utilities

Here are some common issues and solutions for fixing Windows installation problems using command-line utilities:

#* 0 *#

Install and Repair Windows Installation

To install or repair a Windows installation, you can use the following commands in Command Prompt:

#* 1 *#

Install

net start wuauserv

net start msdt.exe

wusa /s /quiet /uninstall /norestart /f

  • net start starts the Windows Update Service.

  • msdt.exe is a command-line tool for managing Microsoft Deployment Toolkit (MDT).

  • wusa is a utility used to manage Windows Update Service (WUA).

  • /s /quiet specifies quiet mode, which disables all output.

  • /uninstall forces the uninstallation of the Windows Update Package.

  • /norestart prevents the system from restarting after installation.

  • /f forces an immediate overwrite of files.

#* 2 *#

Repair

To repair a Windows installation using Command Prompt:

net start wuauserv

net stop msdt.exe

net restart msdt.exe

wusa /s /quiet /reinstall /norestart /f

#* 3 *#

Remove and Reinstall Windows Installation

To remove and reinstall a Windows installation, you can use the following commands in Command Prompt:

#* 4 *#

Uninstall

net start wuauserv

net stop msdt.exe

net restart msdt.exe

wusa /s /quiet /uninstall /norestart /f

Important: The /reinstall option will not be available if you’ve already used the /norestart option.

#* 5 *#

Reinstall

net start wuauserv

net stop msdt.exe

net restart msdt.exe

wusa /s /quiet /install

#* 6 *#

Remove and Install Windows Update Service (WUA)

To remove and reinstall the Windows Update Service (WUA), use:

net start wuauserv

net stop msdt.exe

net restart msdt.exe

wusa /s /quiet /uninstall

Important: You can’t uninstall WUA if you’ve already used the /reinstall option.

#* 7 *#

Troubleshooting

To troubleshoot Windows installation problems, try:

  • Check Event Logs: Use the built-in Event Viewer to check for error messages.

  • Run Disk Cleanup: Remove unnecessary files and free up disk space.

  • Check System Files: Ensure system files are not corrupted by running a scan with the Windows Update Troubleshooter.

  • Update Drivers: Ensure drivers are updated, especially for hardware devices.

Example Use Cases

  • Uninstalling a failed Windows installation using:

net start wuauserv

net stop msdt.exe

net restart msdt.exe

wusa /s /quiet /uninstall /norestart /f

  • Reinstalling a Windows installation from scratch using:

net start wuauserv

net stop msdt.exe

net restart msdt.exe

wusa /s /quiet /install