Accidentally Delete Windir in System Variable

Anonymous
2022-01-16T14:01:06+00:00

Hi,

I accidentally delete WINDIR when I change the setting in System Variable.

Now, I can't open any applications. For example, I can't run the administration for Command Prompt, or open Registry Editor.

Could you help me to reset WINDIR in System Variables?

Thanks.

Windows for home | Windows 11 | Settings

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

10 answers

Sort by: Most helpful
  1. Anonymous
    2022-01-16T14:38:20+00:00

    Hi!

    I'll try to help you.

    Take a look at the link below. I think it'll solve your problem.

    https://answers.microsoft.com/en-us/windows/for...

    All best!

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-01-16T15:09:22+00:00

    Hi Gustavo,

    Thank you for replying.

    I did try to restore my system, but it said 'the system doesn't have anything to change.

    I couldn't reset my PC either and I couldn't access the 'Edit The System Environment Variables'.

    Do you have any other ways?

    Thanks.

    3 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2022-01-16T16:01:12+00:00

    What do you show in the registry key shown below?

    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2022-01-16T16:08:54+00:00

    Hi Saltgrass,

    I couldn't open Registry Editor.

    I try different ways to open it but it doesn't give me access. Such as, Using Windows + R and typing Regedit or searching for Registry Editor.

    Besides, I couldn't open Command Prompt as administrator.

    If you need other information, please let me know.

    Thanks,

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2022-01-16T19:47:25+00:00

    Are you an administrator on that system. The Winkey + R should be able to open the Registry editor. If you aren't admin, then it is understandable why your options for the Environments are greyed out.

    You might also try changing the directory to were regedit is actually kept.. Go to C:\Windows\ and double click the regedit or right click and select run as admin. Or try C:\Windows\regedit.exe in the run box.

    1 person found this answer helpful.
    0 comments No comments