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
| Parameter | Specification |
|---|---|
| Affected Application | Google Drive for Desktop Installer (Windows) |
| Primary Symptom | “Installation failed. Error code: 2004” modal dialog; rollback of installation files |
| Direct Cause | File write locks, corrupted registry keys from partial upgrades, or insufficient installer elevation |
| Admin Access Required | Yes (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:
- Binary Extraction: The installer extracts core files into
%ProgramFiles%\Google\Drive File Stream\[version]. - Driver Registration: It installs and registers kernel-level filesystem drivers required to mount virtual cloud drives in Windows File Explorer.
- Service Configuration: It installs the Google Update service (
gupdateandgupdatem) 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.exeorGoogleUpdate.exeprocesses from a previous installation are still running in a suspended state, locking core.dllfiles. - 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\DriveFSwill not resolve an installer crash. For proper cache management procedures.
- Distinction: Error Code 2004 is a Program Files and driver installation failure, not an AppData cache issue. Wiping
- 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
- Press
Ctrl + Shift + Escto open Task Manager. - Go to the Details tab.
- Locate and terminate any instances of:
GoogleDriveFS.exeGoogleDriveSetup.exeGoogleUpdate.exe
- Right-click each process and select End process tree.
Step 2: Remove Stale Program Files Artifacts
- Open File Explorer and navigate to:Plaintext
C:\Program Files\Google - If a folder named
Drive File Streamexists, try deleting it. - 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
- Download a fresh copy of
GoogleDriveSetup.exedirectly from Google. - Right-click
GoogleDriveSetup.exeand select Run as administrator. - 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:
- Download the official Microsoft Program Install and Uninstall troubleshooter utility.
- Run the tool and select Installing.
- Choose Google Drive from the list of programs to automatically clean up corrupted registry deployment keys.
- Relaunch
GoogleDriveSetup.exeas 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=VERBOSEInspect generated logs in%TEMP%orC:\Windows\Tempfor specific return codes (e.g.,1603fatal 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
WinFspor 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.