I have deleted all my system environment variables.
Benoit -
Hello to you,
I'm writing here because I think I've exhausted all my options to resolve my problem.
Machine:
Asus VivoBook (laptop) Windows 11 (originally 10)
Situation:
Out of sheer folly, I deleted all system (and user) environment variables from my PC and restarted it. Since then, my PC is practically unusable, let me explain:
- I can no longer use Windows features
- Half of the applications I have are missing (Word for example)
- I can't switch to administrator mode
- My PC takes 10 minutes to connect
Good point:
I can access my files and have already transferred everything to an external hard drive
Solutions attempted:
- Restore the environment variables using CMD (setx /M Path=xxx) --> impossible because I need to be an administrator
- I have exhausted all solutions to become an administrator (right-click, code in CMD, PowerShell), unable to access it
- I tried to reinstall Windows by:
- Factory reset from Asus (holding F12) --> it cannot be done
- Using a bootable USB drive --> impossible because it cannot find my SSD
Point of attention: (maybe unimportant)
- When I am in the CMD of the bootable USB drive, the name of my disk is "X" whereas on my PC it is indeed "C" --> if I try to move "cd C:\xxx" it doesn't recognize anything
There you go, I absolutely don't know what to do anymore. I feel completely stuck and I don't know how to "force" a reinstallation (like external formatting of my disk then reinstallation?)
Thank you in advance for your help!
Best regards.
Benoît
2 answers
-
Hello,
Did you not have a restore point?
(To use with RSTRUI or bootable key Repair > System Restore)-
Hello fabul,
Unfortunately not at all, but I have the feeling that my problem is deeper because even if I had one, it seems to me that "Windows" wouldn't want me to do it (just as it prevents me from reinstalling Windows 11)
Thank you!
Benoît
Hello,
I don't have a miracle solution; this crash is all the more serious as not all the variables are trivial, some depend on the system architecture, so we would need to copy the list (except for those concerning the processor) from another PC. Just a few remarks.-If I want to access the command interpreter from the WinRE environment, I need to use CD /D, for example:
CD /D C:\Windows\System32
-I assume you do have an administrator account; otherwise, you wouldn't have been able to delete the system variables.
You then need to enter your credentials in the SETX command:
SETX /m u/ username p/ password
https://ss64.com/nt/setx.html
In any case, even if we manage to tinker with some of them, we're not in a good spot; it would be better to repair Windows. In that regard, I don't see why an installation key wouldn't work if it's done correctly (partition table) and if the BIOS allows booting from it.
Hi Brucine,
Indeed, I only have an administrator account.
Recommendation CMD:
I will try your command with CMD. It seems to me that the WinRE environment is part of the "System Environment Variables" that I deleted.
Recommendation Repair:
Actually, I don't understand either regarding the reinstallation of Windows. I created a bootable USB drive using the "Create Windows 11 Installation Media" (https://www.microsoft.com/en-us/software-download/windows11).
It should normally work, but when it comes time to choose my Windows installation drive, everything is empty! It tells me that a "signed device driver is missing." I searched for a driver for my SSD, but I don't know which one I have (I can't access "Device Manager").
I haven't tried partitioning my SSD, but I'm pretty sure I won't be able to do it.
In short, I'm applying your recommendations!
Thank you!
Benoît
-
-
But no, you can reinstall Windows.
Download the ISO to create a USB key (at least 8GB) to reinstall Windows.
https://www.microsoft.com/fr-fr/software-download/windows11
Once you have the Windows ISO file, you can create your USB key with Rufus in GPT mode for EFI.
https://rufus.ie/en/
Boot from it using the PC's Boot Menu key.https://www.malekal.com/liste-touches-acces-bios-boot-menu-constructeur/
If you can't see it, you can search on Google "[Brand Model] Boot Menu Key".
Choose "Custom installation" (Not upgrade).
No need to format if there's space; if there are data, they will be found in a Windows.old folder.
Install on the same partition, or alternatively, delete all system partitions and create a new one (This will delete the data).
-
Hi!
So, I've created a USB drive using the "Creating a Windows 11 installation media" (the same link as you).
Do you think I would have a better chance with Rufus? Because my problem at this stage is that, on the bootable USB, it doesn't recognize my hard drive (as if it were invisible).
Also, when I go to the command prompt on the USB, I have "X:\WINDOWS" instead of "C:\WINDOWS", as if the CMD on the USB can't communicate with the Win. on my machine.
Anyway, I'm a bit lost, but I'm going to try the USB with Rufus.
P.S: I don't know why, but I can't download the Win11 ISO on my current machine.
Thanks!
Benoit
-