I want to get the windows system directory(i,e C:\Windows\System32) where windows native files(like cmd.exe, xcopy.exe, reg.exe, etc..) are available to prevent Process Hijacking in the batch file by adding an absolute path of .exe in batch file.
I can get this C:\Windows\System32 by using the below command,
%systemroot%\System32\
But I'm afraid that what if all windows don't have their native files always in the "System32".
So my questions are,
- Can windows' default system directory will vary depending on windows versions or something?
- Can we modify the default system directory ourselves?
- These native files(.exe) are always been into the "System32"?