Share via

Restoration of Factory Default Settings of System & User Environments Variables Without Complete Factory Reset (Manually)

Anonymous
2014-10-15T16:57:48+00:00

Greetings,

I have deleted (somehow) all System & User Environment Variables. How could I restore these to their original settings manually?

Before answering the question please consider these particulars (I am not a power user):

  1. I do not want to do a complete factory reset/install of OS.
  2. I have been unable to access administrator level command prompt.
  3. If I attempt to access User Environment Variables the error "Windows cannot find '%windir%\system32\rundll32.exe'..."
  4. If I attempt to access System Environment Variables the error  "Windows cannot find '%windir%\system32\SystemPropertiesAdvanced.exe'..."
  5. User account permissions, generally, are administrator.
  6. There are no restore points.
  7. I have no backup image of data from before.
Windows for home | Previous Windows versions | Security and privacy

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

10 answers

Sort by: Most helpful
  1. Anonymous
    2015-09-30T07:28:27+00:00

    Quit answering questions with Copy/Paste responses.

    Go Delete your Environmental Variables; then try to fix it, and THEN post how you actually accomplished it. Read his original post and his question, he explains his issue perfectly.

    None of the above suggestions have any use whatsoever; as Regedit is just another thing thats inaccessible due to the environmental variables.

    Basically, unless it can be done with Command Prompt WITHOUT Administrative privledges; it can't be done.

    The answer to the question needs to involve a way to add registry values without accessing regedit; or to add environmental variables without accessing system properties; admin cmd prompt; or regedit.

    Also, this environmental variable problem causes any and all downloaded EXEs to not function correctly (like antiviruses)

    So, one of you helpful people out there take one for the team and delete your variables; like MANY people out there have done; and fix it; then post how you did so.

    At least 1000 google posts with this issue; and no actual fixes out there.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2014-10-16T15:45:16+00:00

    Hi Shrikar Acharya/MICROSOFT,

    After pressing WINDOWS KEY + R and ENTER/OK after about thirty (30) seconds a dialogue box appears showing C:\Windows\REGEDIT.exe and ‘The system could not find the environment option that was entered.’

    Therefore, this approach seems unlikely to work without further advise.

    IDEA: Is it possible to use SFC /scannow using CMD.exe console?

    I should note that I have attempted this already, in some form; the return notice includes: ‘You must be an administrator running a console session in order to use the sfc utility.’

    Consequently, in CMD.exe console I’ve entered

    ‘RUNAS /NOPROFILE /USER:ADMINISTRATOR CMD.EXE’

    where then prompted

    ‘Enter the password for administrator:’

    upon entering password

    ‘Attempting to start cmd.exe as user “COMPUTERNAME\administrator” … RUNAS ERROR: Unable to run - cmd.exe

    2: The system cannot find the file specified.’ is returned/displayed.

    This gives rise to a need for another approach to resolving the issue. Could you please advise me on another approach to manually fix the issue?

    Respectfully requesting,

    ProfessorPhi

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2014-10-16T12:31:55+00:00

    Hi,

    Thank you for contacting Microsoft Community.

    I understand that you have deleted system environment variable and you can’t do a system restore, which could have fixed the issue.

    Please perform the below steps in order to restore system environment variable:


    Modify the registry values:


    Refer to the article below before modifying registry values:


    How to back up and restore the registry in Windows

    This method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756 (http://support.microsoft.com/kb/322756/)

    Restoring User PATH:

    1. Press “Windows key” + “R”.
    2. Type in Regedit
    3. Click ok
    4. Select HKEY_USERS
    5. File->Load Hive
    6. Navigate to your user folder, click the little button to the right of "Open" for "Show Previous Versions"
    7. Select appropriate revision
    8. Select NTUSER.DAT (must have Show Hidden Files enabled)
    9. Give it a name (e.g. "Old")

    10.   Navigate to "Old"\Environment

    Restoring System PATH:

    1. Press “Windows key” + “R”.
    2. Type in Regedit
    3. Click ok
    4. Select HKEY_LOCAL_MACHINE
    5. File->Load Hive
    6. Navigate to C:\Windows\System32\config\RegBack, click the little button to the right of "Open" for "Show Previous Versions"
    7. Select appropriate revision
    8. Select SYSTEM.OLD
    9. Give it a name (e.g. "Old")

    10.  Navigate to HKEY_LOCAL_MACHINE"Old"\ControlSet001\Control\Session Manager\Environment

    11.  Open the PATH value and copy it to clipboard, then paste into system environment variables screen.

    Note that for System, depending on how long ago this was, you can just go back into HKLM(old control set version)\Control\Session Manager\Environment without loading an old hive, but this is a generally useful way to apply "Restore Previous Versions" to the registry.

    Please perform system restore after completing above steps. If you still can’t access old restore point you may have to perform System Repair.

    Hope this information helps, please get back to us if you need further assistance.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2017-07-15T21:41:42+00:00

    Hi,

    This thread was created on October 16, 2014, a lot of changes have been made since then and the resolution provided here may no longer be applicable anymore. We suggest that you create your own thread in order to get the best assistance from our community.

    Be sure to post in the community if you have other concerns.

    Regards.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2014-10-25T05:21:44+00:00

    i think the only thing that you can do now is to reset your pc.

    Was this answer helpful?

    0 comments No comments