Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 

vcBlackBox

%Windir% vs %SystemRoot%

Recommended Posts

Shark007    0

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

Share this post


Link to post
Share on other sites
SiMoNsAyS    0

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)

Share this post


Link to post
Share on other sites
MHz    11

%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

Share this post


Link to post
Share on other sites
OuTmAn    0

(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

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.

×