Like the title says, %Windir% vs %SystemRoot%
Is one better than the other one and why?
Page 1 of 1
%Windir% vs %SystemRoot% Which one is better?
#2
Posted 08 August 2005 - 04:19 PM
This one puzzles me also... after a bit of google'ing I've come up with:
SYSTEMROOT = System returns the location of the Windows root directory.
WINDIR = System returns the location of the OS directory.
They mean the same thing (today).
I'm thinking, back in the pre32bit operating system days the windir may have been
on a different drive, eg. D:\Windows, while the DOS operating system
exisited in the C:\dos directory.
Or, i may be completely out to lunch.
also: just for reference, if you go to: My Computer / Properties / Advanced TAB
and click on 'Environment Variables' and scroll the lower window to the bottom,
you find 'windir'.
Double clicking this results in the windir variable having a value of '%systemroot%
leading me to believe %systemroot% is the 'basis' for this variable.
Shark
SYSTEMROOT = System returns the location of the Windows root directory.
WINDIR = System returns the location of the OS directory.
They mean the same thing (today).
I'm thinking, back in the pre32bit operating system days the windir may have been
on a different drive, eg. D:\Windows, while the DOS operating system
exisited in the C:\dos directory.
Or, i may be completely out to lunch.
also: just for reference, if you go to: My Computer / Properties / Advanced TAB
and click on 'Environment Variables' and scroll the lower window to the bottom,
you find 'windir'.
Double clicking this results in the windir variable having a value of '%systemroot%
leading me to believe %systemroot% is the 'basis' for this variable.
Shark
This post has been edited by Shark007: 08 August 2005 - 04:22 PM
#3
Posted 08 August 2005 - 06:14 PM
basically, you can use %systemroot% from the very first step on the setup.
however %windir% is only available after T-13 (or that's what i think at least
)
however %windir% is only available after T-13 (or that's what i think at least
#4
Posted 08 August 2005 - 07:03 PM
%WinDir% is old dated environment variable for the Windows folder.
%SystemRoot% is the newer dated environment variable for the Windows folder.
%WinDir% remains in use, to allow batch scripts to run on both NT and 9x systems. If you use an NT command script, then %SystemRoot% would be more suitable to use.
I would expect all system environment variables to be available at the same time.
Windows NT and Windows 2000 do not have a Windows directory, so %WinDir% would have been strange? They have WinNT folders instead, which may have prompted the change?
%SystemRoot% is the newer dated environment variable for the Windows folder.
%WinDir% remains in use, to allow batch scripts to run on both NT and 9x systems. If you use an NT command script, then %SystemRoot% would be more suitable to use.
I would expect all system environment variables to be available at the same time.
Windows NT and Windows 2000 do not have a Windows directory, so %WinDir% would have been strange? They have WinNT folders instead, which may have prompted the change?
This post has been edited by MHz: 08 August 2005 - 07:09 PM
#5
Posted 08 August 2005 - 10:08 PM
Cool, thanks.
I was just worried that one variable might depending on the situation, give a slightly different location than the other one. Thanks for clarifying.
I was just worried that one variable might depending on the situation, give a slightly different location than the other one. Thanks for clarifying.
#6
Posted 06 October 2008 - 01:44 PM
(old topic, I know)
was wondering about that %windir% vs %systemroot% too... did some google search and found this topic
very clear now, particularly due to this part:
I was using %windir% before (because shorter
), but now will use %systemroot% (cleaner)
cheers
was wondering about that %windir% vs %systemroot% too... did some google search and found this topic
very clear now, particularly due to this part:
Shark007, on Aug 8 2005, 11:19 PM, said:
if you go to: My Computer / Properties / Advanced TAB
and click on 'Environment Variables' and scroll the lower window to the bottom,
you find 'windir'.
Double clicking this results in the windir variable having a value of '%systemroot%
leading me to believe %systemroot% is the 'basis' for this variable.
and click on 'Environment Variables' and scroll the lower window to the bottom,
you find 'windir'.
Double clicking this results in the windir variable having a value of '%systemroot%
leading me to believe %systemroot% is the 'basis' for this variable.
I was using %windir% before (because shorter
cheers
This post has been edited by OuTmAn: 06 October 2008 - 01:44 PM
- ← Missing wmdrmsdk.dll & oobe fix
- Unattended Windows 2000/XP/2003
- Changing Default Driver Search Location. →
Share this topic:
Page 1 of 1



Help

Back to top








