User environment variables wiped away - Some windows shortcuts not working now

Inqutec 0 Reputation points
2023-11-20T09:17:19.4533333+00:00

I was working on a powershell script to update the user environment variables. However, the script ended up deleting all the user environment variables - should have looked at the script generated by ChatGPT and ensured that every line was understood!

Is there a way to get the user environment variables back? ChatGPT guessed that registry might have a backup, but could not explore this solution. The backup is nowhere else to be found. Post this deletion, there are peculiar issues like Win + . and Win + V not working. Not certain why the shortcuts stopped working!

Steps to resolve these issues will be much appreciated.

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-12-21T06:37:20.39+00:00

    Hi Inqutec,

    If there is no backup, you can add the user environment variables manually. Type "Edit the system environment variables" in the start menu and select Environment Variables in the Advanced tab in System Properties, then create the user variables like TMP, TEMP and Path.

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    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.

    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.