Hi @Tone Kristin Larsen ,
Are you using any 3rd-party program like antivirus, security management software which may block VS Code from installing? Try to disable them temporarily and test again.
If there are some issues in system environment, the installation will fail as well. Try to update Windows OS, install all the pending update packages, and make sure that there are no Windows update errors.
Also, please run CMD as administrator, run the DISM.exe /Online /Cleanup-image /Restorehealth
command. Wait for it finishes running, run the sfc /scannow
command. These two commands help fix the corrupted system files.
If you changed any system settings or modified any system files, try to double check them, make sure that they won’t block VS Code from installing.
If you still fail to install VS Code, please post this question on Github – vscode for better help.
Best regards,
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.