Uninstall user setup Visual Studio Code

McZeb 1 Reputation point
2022-09-25T21:29:50.123+00:00

Hi community!

I've just integrated Visual Studio Code user setup, due to the auto upgrade feature. The Install is fine but the Uninstall is not. Admin center status is Uninstall Failed The system cannot find the file specified. (0x80070002) See the install/uninstall commands below. I've also tested with "%LocalAppData%\Programs\Microsoft VS Code\unins000.exe" /SILENT /NOCANCEL

Anyone encountered a similar problem and found a solution?

Install command: VSCodeUserSetup-x64-1.65.2.exe /SILENT /NOCANCEL /MERGETASKS=!runcode
Uninstall command: "C:\Users\%UserName%\AppData\Local\Programs\Microsoft VS Code\unins000.exe" /SILENT /NOCANCEL
Install behavior: User

Microsoft Intune Application management
Microsoft Intune Application management
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Application management: The process of creating, configuring, managing, and monitoring applications.
959 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Lu Dai-MSFT 28,411 Reputation points
    2022-09-26T06:30:51.8+00:00

    @McZeb Thanks for posting in our Q&A.

    Based on my research, I find that some information about this uninstall command. Please refer to the following article:
    https://silentinstallhq.com/visual-studio-code-silent-install-how-to-guide/
    https://stackoverflow.com/questions/52728766/how-to-uninstall-vs-code-from-cli-on-windows
    Note: Non-Microsoft link, just for the reference.

    It is suggested to try the following uninstall command:

    "C:\Program Files\Microsoft VS Code\unins000.exe" /SILENT  
    

    Hope it will help.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Susan George 0 Reputation points
    2024-05-07T12:13:12.08+00:00

    Try it with this:

    "%systemdrive%\Users%UserName%\AppData\Local\Programs\Microsoft VS Code\unins000.exe" /SILENT /NOCANCEL" /qn

    It's working for me in the .bat file

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.