| 1. |
Solve : Have to be in C:\Windows\System32 to run files in that folder? |
|
Answer» ...and I thought that SINCE that is in the System Path, I could run files in C:\Windows\System32 from anywhere? Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem; <may be much more, but the first 2 in blue should be at the beginning That's it! Java had pre-empted Windows at the beginning of my path, and once I moved it back in the queue and restarted, it worked just like I thought it should! Thanks! This happened to me, and I SUSPECT a number of other people. For some reason I'm not sure of, the java install sometimes ADDS the Java binaries folders to the beginning of the PATH system variable, instead of appending them to the end as they should be. Furthermore it does it badly so that the PATH becomes malformed. As you can see, the PATH system variable is a semicolon-separated list of folder paths. For commands external to cmd.exe, the system searches each folder in the PATH system variable in turn. If the list becomes DAMAGED in some way (e.g. a missing semicolon), before it gets to "C:\WINDOWS\system32;C:\WINDOWS;" then the system just gives up & you get the "not recognized as an internal or external command" message. That's why these folders should be at the start. That way, the system finds the commands fast, early in the search. An unfortunate side effect of this method hunting along the PATH variable is that by adding a folder to the beginning of the PATH you can intentionally or accidentally pre-empt an external command with another identically named .exe, since the system executes the first one that it finds. |
|