0

how to fix this error

i deleted all environment variables and systems variables what i do now how to fix this

enter image description here

enter image description here

enter image description here

Journeyman Geek
  • 129,178
  • You may have to reinstall Windows on it. – Rohit Gupta Jan 08 '24 at 12:13
  • 3
    Boot into WinPE and load the registry hive so you can modify and restore the original PATH variable contained within HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment. Of course, you should be able to manually navigate to the directory that contains SystemPropertiesAdvanced.exe – Ramhound Jan 08 '24 at 15:28
  • @Ramhound You should make that an answer. I do not see another way to fix this either. – Daniel B Jan 10 '24 at 13:32
  • @AnjhaDish - No; There is no other way. At this point since your asking me questions in a language I don’t understand I won’t help you. – Ramhound Jan 10 '24 at 13:57

3 Answers3

1

Open a commandprompt as administrator

Type in the following:

set path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps
set windir=C:\Windows
set SystemDrive=C:
set SystemRoot=C:\WINDOWS
set ProgramData=C:\ProgramData
set ProgramFiles=C:\Program Files
set ProgramFiles(x86)=C:\Program Files (x86)
set ProgramW6432=C:\Program Files

setx PATH "%PATH%" setx windir "%windir%" setx SystemDrive "%SystemDrive%" setx SystemRoot "%SystemRoot%" setx ProgramData "%ProgramData%" setx ProgramFiles "%ProgramFiles" setx ProgramFiles(x86) "%ProgramFiles(x86)%" setx ProgramW6432 "%ProgramW6432%"

LPChip
  • 61,264
  • my command prompt can't open as administrator how to fix this system – Anjha Dish Jan 08 '24 at 12:00
  • Can you open explorer, then manually navigate to C:\Windows\System32, find cmd.exe there, and right-click run as Administrator? If that doesn't work, can you start Task Scheduler using the shortcut from your start menu? (search there) – LPChip Jan 08 '24 at 13:07
  • Also, you can try these: https://www.shellhacks.com/set-environment-variable-without-admin-rights-windows/ – LPChip Jan 08 '24 at 13:11
  • @AnjhaDish - So navigate to the directory that contains PowerShell executable or cmd.exe. This problem can be solved without reinstalling Windows. – Ramhound Jan 08 '24 at 15:33
  • It should, yes. If for some reason you still can't run cmd as administrator from explorer, I know another way using TaskScheduler by saving the above as a file.cmd and then running it as SYSTEM user. – LPChip Jan 08 '24 at 15:51
  • cant open cmd as administrator – Anjha Dish Jan 09 '24 at 06:22
  • Can you start TaskScheduler then? Also, try running the above without administrator and see if that works. It may be enough to allow you to open a cmd as admin and repeat it. – LPChip Jan 09 '24 at 17:09
  • thank you to all i solve my problems thanks – Anjha Dish Jan 11 '24 at 09:40
  • How did you solve it? If one of the answers here was the solution, could you mark that answer as solved? If not but one of the answers was closest to what you did, mark that one as solved. If solved in a completely different way, can you post an answer of your own and accept that one? This will allow others to learn from it and also tell people you no longer need help. – LPChip Jan 11 '24 at 16:33
0

If System Restore is enabled, rollback to a time before this was done.

You get to System Restore via Start > Create a restore point and clicking the "System Restore" button. If you see any checkpoints, verify their date.

If your PATH is not working, here's the full path of the program :
C:\Windows\System32\SystemPropertiesProtection.exe.

harrymc
  • 480,290
-1

If you still can than try to create a new profile and using it or import data from it.