Alstromeria
Alstromeria

Reputation: 1

Win11: VSCode disappeared, and all attempts to reinstall hang on "setup is preparing to install visual studio code"

VSCode is gone and I'm unable to reinstall it on Win11.

Symptoms are identical to this closed issue from 2018: https://github.com/microsoft/vscode/issues/43949

History: VSCode was running happily on my Win11 laptop (user install) for at least six months. I used it every day. On October 2 (I think) it disappeared - no longer in programs/features, and the shortcut changed to a missing file. I can only presume Code self-updated and committed suicide? I've always let it run updates when they're available. The only Windows update that happened that day or even near it is PowerShell v7.3.7.

All attempts at vscode reinstallation have failed and result only in a dialog box that says "Setup is preparing to install Visual Studio Code on your computer". Task manager displays a 32-bit installer running although I'm using x64.

Screenshot of lying dialog box

Screenshot of task manager

Most times I can't even end the dialog box without killing the process; the cancel button doesn't respond, nor does the x. The event logs don't mention code at all except when I force quit the setup:

The program VSCodeUserSetup-x64-1.83.0.tmp version 51.1052.0.0 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Security and Maintenance control panel.
 Process ID: 6588
 Start Time: 01d9fc947889a218
 Termination Time: 4294967295
 Application Path: C:\Users\JBLOGGS\AppData\Local\Temp\is-DNV0F.tmp\VSCodeUserSetup-x64-1.83.0.tmp
 Report Id: 39830549-0ada-4c69-b079-db7308816e4b
 Faulting package full name: 
 Faulting package-relative application ID: 
 Hang type: Top level window is idle

WHAT I'VE TRIED

This issue is 10000% repeatable. Nothing else seems amiss.

I've temporarily disabled the security tools I can disable, although I can't touch some (crowdstrike) and am not going to mess around with that or I'll make powerful enemies. Anyway, I installed Code for the first time with all these tools running, and I can currently install / update other things without issues.

Advice? My appdata\username\roaming\code folder is still intact, but there's nothing new in the logs since this happened. I sync my settings so I'm not worried about losing that so much - I just want the application back.

I would like to find the installation/error logs (if they've even been generated) if someone can help me find them.

Upvotes: 0

Views: 2588

Answers (3)

Justin Townsend
Justin Townsend

Reputation: 31

I ran into a similar problem, where a shortcut I had pinned to the taskbar no longer worked. Navigating to the file "location" I've found that a recent install of VS Code has added an additional directory "_" onto the path and moved the "Code.exe" file into this folder. Unclear as to why.

In any case, it might just be a case of checking it hasn't moved someplace else before a more lengthy diagnosis.

Upvotes: 3

Joe Cox
Joe Cox

Reputation: 1

I got same issue exactly and work around here not work. I downloaded and unzipped the vscode then added its bin path: https://learn.microsoft.com/en-us/answers/questions/324197/unable-to-install-visual-studio-code-editor

Upvotes: 0

cammart
cammart

Reputation: 1

This just happened to me.

This is how I solved it, hope it helps!

runas /machine:x86 /trustlevel:0x20000 .\VSCodeUserSetup-x64-1.69.2.exe 

Upvotes: 0

Related Questions