I was writing a batch file that was supposed to automatically set up a computer to receive "psexec" remote commads. Unluckly i didn't really pay attention to what i was writing and i wrote this command and then ran It:
setx /M Path "C:\Windows\System32\PSTools"
You can imagine what happened... I erased all the other path variables! Then, panicking, mis-reading an online-forum, I restarted the computer. I had no backups, no saving points and neither, obviously, opened cmd's or powershell's session. My questions are:
- Is there still a way to recover the path variables i lost or they're gone forever?
- If they're gone, is there a way for me to like "re-write" them or just get a list of the missing ones?
I know that my questions will seem stupid to the experienced programmers and i apologise for that, but I actually started this project with almost zero skills in bat, cmd, and the other stuffs... Thanks to everyone that will help <3
Updated:
Ok, i have found in "C:\"
a folder called "Windows.old"
, is It possible that inside It are still stored the path variables? Inside this folder there are mostly the same folders and files as "C:\Windows"
one and is full of ".mui" files, but if I do the "advanced start-up" the computer says there are no restore points. I guess that in C:\Windows.Old
there are still the path variable I had before updating to Windows 10. They've remained the same sice then, I haven't downloaded any new software, how can I access to that old path variables??
install.wim
|install.esd
and it's a good bet they're listed somewhere on Microsoft Docs as well. Since I'm not certain where that information resides in either, the simplest way to do this is to have someone copy and paste their$PATH
- I can do so first thing in the morning.