How to Fix Error Code 2004: Installation Failed

Error Code 2004 during Google Drive for Desktop installation indicates that the setup executable (GoogleDriveSetup.exe) was aborted by the operating system installer engine. This failure typically occurs because a previous version was not cleanly removed, lingering background processes are holding file locks on Google Drive binaries, or the installer lacks the elevated administrative permissions required to write kernel-level virtual filesystem drivers.

Fast Fix

Restart your computer to terminate lingering background processes. Right-click the newly downloaded GoogleDriveSetup.exe installer and select Run as administrator. If the setup fails again, open Windows Installed apps, uninstall any existing “Google Drive” entry, delete the %ProgramFiles%\Google\Drive File Stream folder, and re-run the installer.

Diagnostic Snapshot

ParameterSpecification
Affected ApplicationGoogle Drive for Desktop Installer (Windows)
Primary Symptom“Installation failed. Error code: 2004” modal dialog; rollback of installation files
Direct CauseFile write locks, corrupted registry keys from partial upgrades, or insufficient installer elevation
Admin Access RequiredYes (System administrator privileges required for driver registration and registry writes)

What This Means: System Mechanics

Installing Google Drive for Desktop is more complex than installing standard user-space applications because it includes a virtual filesystem driver (WinFsp) and system services:

  1. Binary Extraction: The installer extracts core files into %ProgramFiles%\Google\Drive File Stream\[version].
  2. Driver Registration: It installs and registers kernel-level filesystem drivers required to mount virtual cloud drives in Windows File Explorer.
  3. Service Configuration: It installs the Google Update service (gupdate and gupdatem) to handle automated background patching.

When Error Code 2004 occurs, the Windows installer encounters an unhandled exception—most often an Access Denied or File In Use condition—during binary extraction or driver registration. Because the installer cannot overwrite existing locked components or register the driver service, it executes an automatic rollback and returns Code 2004. If you need a comprehensive overview of related setup and sync errors.

Common Causes

  • Orphaned Background Processes: GoogleDriveFS.exe or GoogleUpdate.exe processes from a previous installation are still running in a suspended state, locking core .dll files.
  • Corrupted Program Files Residue: Previous updates left orphaned version subdirectories inside C:\Program Files\Google\Drive File Stream\ that have restricted read/write flags.
  • Insufficient Privileges / UAC Restrictions: Running the installer under a standard user account where User Account Control (UAC) cannot elevate the driver installation sub-routine.
  • Antivirus / Endpoint Security Blocking WinFsp: Security tools flagging the virtual filesystem driver registration as an unauthorized system modification.
  • Pending Windows Reboot: A prior Windows Update or driver installation marked system files for replacement on the next restart, preventing new driver registrations.

Common Misdiagnoses

  • Misdiagnosis: “The user’s Google Workspace account is suspended.”
    • Distinction: Account status has no bearing on binary installation. Account licensing is only evaluated when the user signs in after installation. If your account is blocked by administrative policy.
  • Misdiagnosis: “The local user cache is corrupted and needs deletion.”
    • Distinction: Error Code 2004 is a Program Files and driver installation failure, not an AppData cache issue. Wiping %LOCALAPPDATA%\Google\DriveFS will not resolve an installer crash. For proper cache management procedures.
  • Misdiagnosis: “The installer payload is deprecated.”
    • Distinction: While running outdated installers can lead to deprecation warnings, obsolete clients will typically install and then prompt an update notice upon login.

Resolution Steps

Step 1: Terminate All Google Processes

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. Go to the Details tab.
  3. Locate and terminate any instances of:
    • GoogleDriveFS.exe
    • GoogleDriveSetup.exe
    • GoogleUpdate.exe
  4. Right-click each process and select End process tree.

Step 2: Remove Stale Program Files Artifacts

  1. Open File Explorer and navigate to:Plaintext C:\Program Files\Google
  2. If a folder named Drive File Stream exists, try deleting it.
  3. If Windows states that files inside the folder are in use, restart your computer into Safe Mode or reboot normally and immediately delete the folder before launching other apps.

Step 3: Run the Installer with Elevated Privileges

  1. Download a fresh copy of GoogleDriveSetup.exe directly from Google.
  2. Right-click GoogleDriveSetup.exe and select Run as administrator.
  3. Follow the on-screen prompts to complete the installation.

Step 4: Clean Residual Windows Installer Keys (If Setup Continues to Fail)

If Windows still registers an incomplete installation:

  1. Download the official Microsoft Program Install and Uninstall troubleshooter utility.
  2. Run the tool and select Installing.
  3. Choose Google Drive from the list of programs to automatically clean up corrupted registry deployment keys.
  4. Relaunch GoogleDriveSetup.exe as administrator.

Admin & Advanced Checks

  • Command-Line Installation Logging: Administrators deploying Google Drive across managed endpoints can capture detailed MSI logs to identify the exact failing action:DOS GoogleDriveSetup.exe --silent --install --gsuite_machine_log_level=VERBOSE Inspect generated logs in %TEMP% or C:\Windows\Temp for specific return codes (e.g., 1603 fatal errors or driver registration blocks).
  • Enterprise Software Management Collisions: If deploying through Microsoft Intune, SCCM, or Group Policy, ensure that pre-install scripts terminate running client instances before launching the installer. If the client experiences startup crashes after successful deployment.

Hard Stops

  • Third-Party Driver Collisions: If the installer fails repeatedly and Windows system event logs record WinFsp or filesystem filter driver registration crashes, check for incompatible third-party virtual drive software (such as legacy Dokan drivers, Box Drive, or conflicting endpoint encryption drivers). Do not attempt to force-modify kernel subsystem drivers without confirming driver interoperability.