Skip to content

Setup gets stuck due to dllhost.exe blocking inno_updater.exe from finishing cleanup #318029

Closed

Description

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.121.0
  • OS Version: Windows 11 25H2 (build 8390)

Steps to Reproduce:

  1. Run installer via Company Portal (in System context), exact command line: VSCodeSetup-x64.exe /VERYSILENT /NORESTART /MERGETASKS=!runcode,addcontextmenufiles,addcontextmenufolders

I've experienced the same issue as reported previously and closed as fixed in v1.120: #294546
The offending dllhost.exe process wasn't killed as expected and inno_updater.exe got stuck as a result, exactly as before, same on two separate machines.

Full inno_updater log below:

May 22 20:48:41.816 INFO Removing files from base directory of "C:\\Program Files\\Microsoft VS Code\\Code.exe", preserving commit folder: f6cfa2ea24, main_exe: Some("Code.exe"), proxy_exe: None
May 22 20:48:41.818 INFO remove_files: "C:\\Program Files\\Microsoft VS Code\\Code.exe", commit: f6cfa2ea24, main_exe: Some("Code.exe"), proxy_exe: None
May 22 20:48:41.818 INFO Reading top-level directory: "C:\\Program Files\\Microsoft VS Code"
May 22 20:48:41.818 INFO Processing bin directory: "C:\\Program Files\\Microsoft VS Code\\bin"
May 22 20:48:41.818 INFO Skipping non-old file in bin: "C:\\Program Files\\Microsoft VS Code\\bin\\code"
May 22 20:48:41.819 INFO Skipping non-old file in bin: "C:\\Program Files\\Microsoft VS Code\\bin\\code-tunnel.exe"
May 22 20:48:41.819 INFO Skipping non-old file in bin: "C:\\Program Files\\Microsoft VS Code\\bin\\code.cmd"
May 22 20:48:41.819 INFO Skipping code_path executable: "C:\\Program Files\\Microsoft VS Code\\Code.exe"
May 22 20:48:41.819 INFO Skipping VisualElementsManifest.xml: "C:\\Program Files\\Microsoft VS Code\\Code.VisualElementsManifest.xml"
May 22 20:48:41.819 INFO Skipping commit folder: "C:\\Program Files\\Microsoft VS Code\\f6cfa2ea24"
May 22 20:48:41.819 INFO Skipping unins file: "C:\\Program Files\\Microsoft VS Code\\unins000.dat"
May 22 20:48:41.819 INFO Skipping unins file: "C:\\Program Files\\Microsoft VS Code\\unins000.exe"
May 22 20:48:41.819 INFO Skipping unins file: "C:\\Program Files\\Microsoft VS Code\\unins000.msg"
May 22 20:48:41.819 INFO Collected all directories and file handles for removal
May 22 20:48:41.819 INFO All file handles marked for deletion
May 22 20:48:41.819 INFO All files deleted
May 22 20:48:41.819 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 1)
May 22 20:48:41.868 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 2)
May 22 20:48:42.069 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 3)
May 22 20:48:42.521 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 4)
May 22 20:48:43.322 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 5)
May 22 20:48:44.573 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 6)
May 22 20:48:46.374 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 7)
May 22 20:48:48.826 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 8)
May 22 20:48:52.028 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 9)
May 22 20:48:56.079 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 10)
May 22 20:49:01.080 INFO Delete directory recursively: "C:\\Program Files\\Microsoft VS Code\\0958016b2a" (attempt 11)

This how the setup log ends, something clearly didn't work as expected:

2026-05-22 20:48:40.975   Context menu state: isBackgroundUpdate=false, isWindows11OrLater=true, isWindows10ContextMenuForced=false, shouldUseWindows11ContextMenu=true, hasLegacyFileContextMenu=false, hasLegacyFolderContextMenu=false, shouldRepairFolderContextMenu=false, shouldInstallLegacyFolderContextMenu=false, addcontextmenufiles=true, addcontextmenufolders=true
2026-05-22 20:48:40.975   KillContextMenuComSurrogate: stopping COM surrogate(s) hosting context-menu DLL (1C6DF0C0-192A-4451-BE36-6A59A86A692E)
2026-05-22 20:48:41.703   KillContextMenuComSurrogate: PowerShell exited with non-zero code 1
2026-05-22 20:48:41.703   Invoking inno_updater to remove previous installation folder

Activity

  1. obuolinis commented on May 22, 2026

    @obuolinis
    Author

    From what i can see the setup is trying to execute this command line: "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -Command "Get-CimInstance Win32_Process -Filter ""Name = 'dllhost.exe'"" | Where-Object { $_.CommandLine -like '*/Processid:1C6DF0C0-192A-4451-BE36-6A59A86A692E*' } | ForEach-Object { try { Stop-Process -Id $_.ProcessId -Force -ErrorAction Stop } catch {} }"

    If i try to execute this exact same command line from cmd, I get this error:

    The string is missing the terminator: ".
        + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
        + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
    

    A syntax bug like that, are you serious?

  2. Derion1000 commented on May 22, 2026

    @Derion1000

    derion thank you!

  3. alexhass commented on Jun 1, 2026

    @alexhass

    1.22.1 does not install, too.

    The issue persist since at minumum 6-8 releases where files stay open and do not get closed. This is not limited to deployment via intune, this happens with every system installer that gets auto-updated. At home I killed the setup process to complete, but with intune deployment, this cannot done. Not sure why the setup blocks itself.

  4. added
    bug
    install-update
    windows
    on Oct 5, 2026
  5. momoandbanana22 commented on Oct 25, 2026

    @momoandbanana22

    Still reproduces with 1.143.1 (user setup, background update) on Windows 11 build 26200. build/win32/code.iss on main still has the same ""Name = ''dllhost.exe''"" quoting in KillContextMenuComSurrogate.

    Setup log of the background update on 2026-10-24 (the update on 2026-10-22 logged the same failure):

    2026-10-24 09:07:05.046   KillContextMenuComSurrogate: stopping COM surrogate(s) hosting context-menu DLL (1C6DF0C0-192A-4451-BE36-6A59A86A692E)
    2026-10-24 09:07:06.978   KillContextMenuComSurrogate: PowerShell exited with non-zero code 1
    2026-10-24 09:07:07.853   Removing current Microsoft.VisualStudioCode_1.0.143.0_neutral__8wekyb3d8bbwe appx installation...
    2026-10-24 09:07:44.093   Remove-AppxPackage for current appx installation complete with result code 0.
    

    Another visible effect on user installs: because the surrogate is not stopped, Remove-AppxPackage has to terminate it, and Windows records that as an application hang:

    • Application log, event 1002 (Application Hang) for dllhost.exe at 09:07:42
    • Event 1001, MoAppHang, P1 Microsoft.VisualStudioCode_1.0.143.0_neutral__8wekyb3d8bbwe

    These show up in Reliability Monitor as "dllhost.exe stopped interacting with Windows" and lower the stability index. This machine has seven such entries for the VS Code package between 2026-09-25 and 2026-10-24. The four that I could match against the AppX deployment log (2026-10-14 onward) all coincide with a VS Code update.

    I ran the exact argument string from KillContextMenuComSurrogate in 1.143.1 through both the 32-bit and the 64-bit Windows PowerShell 5.1, passed raw via CreateProcess, with Stop-Process replaced by Write-Output $_.ProcessId. Both fail with TerminatorExpectedAtEndOfString and exit code 1.

    Either of these variants parses in both and finds the running surrogate (exit code 0):

    // a) escape the inner double quotes with backslashes
    'Get-CimInstance Win32_Process -Filter \"Name = ''dllhost.exe''\" | ' +
    'Where-Object { $_.CommandLine -like ''*/Processid:{#FileExplorerContextMenuCLSID}*'' } | ' +
    
    // b) avoid inner double quotes altogether
    'Get-CimInstance Win32_Process | ' +
    'Where-Object { $_.Name -eq ''dllhost.exe'' -and $_.CommandLine -like ''*/Processid:{#FileExplorerContextMenuCLSID}*'' } | ' +
  6. added this to the 1.145.0 milestone on Oct 27, 2026
  7. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginsiders-releasedinstall-updateverifiedwindows

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions