Windows cannot find: C:\User\(User Name)\(Folder)

Anonymous
2024-12-11T17:10:09+00:00

I recently change a folder's name in C:\Users\ from A to B. Visual Studio Code used to be in A and now I cannot uninstall it and when I tried to uninstall it, a message says Windows cannot find: C:\User\A\AppData\Local\Programs\Microsoft VS Code\unins000.exe. What can I do about it? Note that there is no more C:\Users\A in the File Explorer and I can still use the app just fine, but when I typed code . in PowerShell, it does not get recognized. In Registry Editor, there are 2 folders named Computer\HKEY_USERS\S-1-5-21-2198412406-2551858265-2123393027-1001 and Computer\HKEY_USERS\S-1-5-21-2198412406-2551858265-2123393027-1001_Classes where the latter one has a bunch of folders named vscode and VSCode.something and the former one does not.

Windows for home | Windows 11 | Microsoft Store

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emmanuel Santana 33,160 Reputation points Independent Advisor
    2024-12-11T20:13:36+00:00

    Hello, thank you for reaching out to the Microsoft Community. I'm here to help with your questions or issues. Just note – this is a place where passionate Microsoft users help each other, we don't work directly for Microsoft.

    About your issue, this happens because renaming a user folder in C:\Users\ can cause system inconsistencies, as many apps and settings rely on the original path. For VS Code, the uninstaller and some settings still refer to the old folder name (A).

    The simplest fix is to reinstall VS Code, which will automatically update any broken paths. Manually updating the paths in the registry would be time-consuming.

    If the code command isn't recognized, try updating the path:

    1. Press Win + R, type sysdm.cpl, and hit Enter.
    2. Go to Advanced > Environment Variables in System Properties.
    3. Edit the Path variable under System variables.
    4. Update any paths pointing to C:\Users\A to the new folder (C:\Users\B).

    Let me know if this worked for you.

    0 comments No comments