vcBlackBox

%Windir% vs %SystemRoot%

6 posts in this topic

Like the title says, %Windir% vs %SystemRoot%

Is one better than the other one and why?

0

Share this post


Link to post
Share on other sites

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

Edited by Shark007
0

Share this post


Link to post
Share on other sites

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 :P)

0

Share this post


Link to post
Share on other sites

%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?

Edited by MHz
0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

(old topic, I know)

was wondering about that %windir% vs %systemroot% too... did some google search and found this topic :thumbup

very clear now, particularly due to this part:

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.

I was using %windir% before (because shorter :whistle:), but now will use %systemroot% (cleaner)

cheers

Edited by OuTmAn
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.