Visual Studio setup closes. [SOLVED]

Martin Keernik 0 Reputation points
2023-12-03T03:13:01.6866667+00:00

After uninstalling Visual studio, I tried to install it again. But after I open the Visual Studio setup, this screen appears and then closes. how do I fix it, I've already tried opening it with "Run as administrator".

Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,068 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 31,946 Reputation points Microsoft Vendor
    2023-12-04T03:03:36.39+00:00

    Hello @Martin Keernik ,

    Welcome to Microsoft Q&A forum.

    Please first try to reboot your machine, download a new VS setup file and put it in the root directory of the C drive for example C:\VSSetup.exe and then run it.

    If everything includes VS worked well, before you uninstalled it, then this issue may be related to remained cache/files of VS. If there was an error before you uninstalled VS, then this issue may be related to this error.

    Please check following folders/Registry keys(remember to back up the Registry keys before removing them) and make sure that they have been removed or renamed before you try to install VS.

    C:\Program Files (x86)\Microsoft Visual Studio

    C:\Program Files\Microsoft Visual Studio

    %programdata%\Microsoft\visualstudio\packages

    %Temp%(I suggest just renaming this folder, instead of removing it. You may need to reboot your machine before renaming it)

    C:\Users\username\AppData\Local\Microsoft\VisualStudio\1X.0_XXXXXXXX

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\VisualStudio\Setup

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup

    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\Setup

    If you changed anything like environment variables, Windows Registry keys or removed any files, please try to recover them.

    In case it’s related to the error which you got before uninstalling VS, please try following:

    Open CMD as administrator, run DISM.exe /Online /Cleanup-image /Restorehealth command, wait for it finishes running, run sfc /scannow command to fix any corrupted system files.

    Try to download and follow the wizard program to install and use the troubleshooter tool.

    Update Windows OS.

    Disable antivirus, extensions or proxy temporarily and test again.

    Please feel free to let us know the results.

    Sincerely,

    Tianyu


    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 additional answers

Sort by: Most helpful
  1. mohammad mehdi alipour 31 Reputation points
    2023-12-03T07:01:12.66+00:00

    hi friend , I had this problem too

    I think that Visual Studio was not removed correctly or completely

    to fix this issue

    Press Win + R and type %temp%

    Delete all the files and folders within the Temp folder.

    and try installation again!

    I hope it was useful for you


  2. ismail1 0 Reputation points
    2023-12-09T22:25:34.9733333+00:00

    You can install InstallCleanup.exe to fix your problem


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.