Windows User Installer becomes corrupted after reboot with a pending background update
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: Yes — VS Code terminated during ICU initialization, before the extension host could start.
* VS Code Version: Target update 1.137.0 (`645f29cc3176500b4b5762ba887cf2a7f0ffdf2c`). Previous version unknown, likely 1.136.1 based on the timestamp of the old `Code.exe`.
* OS Version: Windows_NT x64 10.0.26200
* Install Type: User Installer
* Install Location: `%LOCALAPPDATA%\Programs\Microsoft VS Code`
* Background Updates: Enabled
## Steps to Reproduce
These are the steps that led to the issue on my machine. I have not attempted to reproduce it again because it can leave the installation unusable.
1. Run VS Code installed using the Windows User Installer.
2. Allow VS Code to download and stage an automatic background update while VS Code remains open.
3. Restart Windows without first manually closing VS Code or applying the pending update through "Restart to Update".
4. After Windows restarts, try to launch VS Code from the shortcut or command line.
## Actual Result
VS Code did not open. Launching it from the command line produced:
```text
[0914/165510.216:ERROR:base\i18n\icu_util.cc:232] Invalid file descriptor to ICU data received.
```
The installation was left in an incomplete pending-update state:
* The old `Code.exe` was still present.
* `new_Code.exe` and `new_Code.VisualElementsManifest.xml` were present.
* `updating_version` was still present.
* There was no `_` directory.
* There was no commit-hash/versioned resource directory.
* `icudtl.dat`, `resources`, `locales`, Electron DLLs, V8 snapshot files, and the other application resources were missing.
* Neither the old nor the new executable could start.
The installation directory before repair contained only:
```text
Mode Length LastWriteTime Name
---- ------ ------------- ----
d----- 2026-09-13 23:17:57 bin
-a---- 235087168 2026-09-03 05:38:40 Code.exe
-a---- 398 2026-09-03 05:33:24 Code.VisualElementsManifest.xml
-a---- 960 2026-09-14 16:57:28 debug.log
-a---- 235087160 2026-09-08 21:15:26 new_Code.exe
-a---- 398 2026-09-08 21:09:58 new_Code.VisualElementsManifest.xml
-a---- 75103943 2026-09-13 23:17:57 unins000.dat
-a---- 3494712 2026-09-13 23:17:31 unins000.exe
-a---- 10093 2026-09-13 23:17:57 unins000.msg
-a---- 40 2026-09-13 23:17:59 updating_version
```
A recursive search under the installation directory found only these relevant files:
```text
%LOCALAPPDATA%\Programs\Microsoft VS Code\Code.exe
%LOCALAPPDATA%\Programs\Microsoft VS Code\new_Code.exe
%LOCALAPPDATA%\Programs\Microsoft VS Code\updating_version
```
No `icudtl.dat` file or versioned resource directory was present anywhere under the installation directory.
## Setup Log Timeline
The background Setup process started staging the update at approximately `2026-09-13 23:17`.
The relevant part of the Setup Log is:
```text
2026-09-13 23:17:57.755 Installation process succeeded.
2026-09-13 23:17:57.755 Context menu state: isBackgroundUpdate=true, isWindows11OrLater=true, isWindows10ContextMenuForced=true, shouldUseWindows11ContextMenu=false, hasLegacyFileContextMenu=true, hasLegacyFolderContextMenu=true, shouldRepairFolderContextMenu=false, shouldInstallLegacyFolderContextMenu=false, addcontextmenufiles=true, addcontextmenufolders=false
2026-09-13 23:17:57.755 KillContextMenuComSurrogate: stopping COM surrogate(s) hosting context-menu DLL (1C6DF0C0-192A-4451-BE36-6A59A86A692E)
2026-09-13 23:17:59.013 KillContextMenuComSurrogate: PowerShell exited with non-zero code 1
2026-09-13 23:17:59.681 Get-AppxPackage result: name=Microsoft.VisualStudioCode, installed=false, resultCode=0, packageFullName=
2026-09-13 23:17:59.681 Skipping Remove-AppxPackage for current appx because package is not installed.
2026-09-13 23:17:59.682 Checking whether application is still running...
2026-09-14 12:21:02.064 Application appears not to be running.
2026-09-14 12:21:02.066 Skipping inno_updater.exe call because OS session is ending or cancel was requested
2026-09-14 12:21:07.584 Need to restart Windows? No
2026-09-14 12:21:07.631 Deinitializing Setup.
2026-09-14 12:21:07.677 Log closed.
```
The updater waited for approximately 13 hours for the application to stop.
The following file was created at the time Windows restarted:
```text
%TEMP%\vscode-stable-user-x64\session-ending.flag
LastWriteTime: 2026-09-14 12:20:59
```
This timestamp closely matches the time at which the Setup Log detected that the application had stopped and then skipped `inno_updater.exe`.
There is no matching `vscode-inno-updater-*.log` for the failed update, which is consistent with the Setup Log explicitly stating that the `inno_updater.exe` call was skipped. The only updater log present is dated after the failed update/repair process.
## Expected Result
When Windows restarts while a background update is pending, VS Code should do one of the following:
1. Safely complete the update; or
2. Skip the update while preserving the previous working installation, allowing the old version to launch after reboot and retry the pending update later.
Skipping `inno_updater.exe` because the OS session is ending should not remove both the old and new versioned resource directories or leave the installation unable to start.
## Workaround / Recovery
The cached installer was still available at:
```text
%TEMP%\vscode-stable-user-x64\CodeSetup-stable-645f29cc3176500b4b5762ba887cf2a7f0ffdf2c.exe
```
Running this installer manually as an in-place repair restored the missing application files. VS Code then started successfully as version 1.137.0.
No user settings, extensions, or workspaces had to be removed.
## Additional Information
The exact previous VS Code version could not be recovered because its versioned resource directory had disappeared. Based on the old `Code.exe` timestamp (`2026-09-03 05:38:40`), it was likely version 1.136.1.
This appears related to the following update/shutdown issues:
* https://github.com/microsoft/vscode/issues/52855
* https://github.com/microsoft/vscode/issues/249239
* https://github.com/microsoft/vscode/issues/300177
The full Setup Log is attached.
[Setup Log 2026-09-13 #001.txt](https://github.com/user-attachments/files/32188791/Setup.Log.2026-09-13.001.txt)
Contributor guide
Assessment
This issue has not been assessed yet.