Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the location of the setx command in Windows 7?

I accidentally deleted my Path variable in Windows. But I have a copy of it saved in a text file. I cannot modify the Path variable from Start->Computer->Properties->Advanced System Settings->Environment Variables, etc. because Windows cannot find systempropertiesadvanced.exe (since the path is empty). So I want to set the path using the setx command from cmd.exe. But I get the error that setx is not a recognized command (probably because the path is empty). So where is the setx command located in Windows 7, usually? Also, if I am missing something here in my reasoning, please let me know.

like image 434
user1748601 Avatar asked Apr 22 '13 04:04

user1748601


People also ask

Where is Setx EXE located?

setx.exe is a legitimate file process developed by Microsoft Corporation. This process is known as SetX- Sets Environment Variables and it belongs to Windows Operating System. You can locate the file in C:\Windows. The virus is created by malware authors and is named after setx.exe file.

What is Setx command?

Creates or modifies environment variables in the user or system environment, without requiring programming or scripting. The Setx command also retrieves the values of registry keys and writes them to text files.

How do I run Setx?

To unset an environment variable from Command Prompt, type the command setx variable_name “”. For example, we typed setx TEST “” and this environment variable now had an empty value.


1 Answers

It is in C:\Windows\System32 (on 64-bit Win7) which is the same location as SystemPropertiesAdvanced.exe.

like image 184
Ken Herbert Avatar answered Oct 11 '22 08:10

Ken Herbert