Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

%Windir% vs %SystemRoot%

- - - - -

  • Please log in to reply
5 replies to this topic

#1
vcBlackBox

vcBlackBox

    Member

  • Member
  • PipPip
  • 144 posts
Like the title says, %Windir% vs %SystemRoot%

Is one better than the other one and why?


How to remove advertisement from MSFN

#2
Shark007

Shark007

    Repackaging Specialist

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,154 posts
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, 08 August 2005 - 04:22 PM.

When posting about an issue in the codec thread,
please state what Operating System you use.


#3
SiMoNsAyS

SiMoNsAyS

    C'mon you apes! You wanna live forever!?

  • Patrons
  • 3,455 posts
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)

#4
MHz

MHz

    Just simple

  • Member
  • PipPipPipPipPipPipPip
  • 1,653 posts
  • OS:Windows 7 x64
  • Country: Country Flag
%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, 08 August 2005 - 07:09 PM.


#5
vcBlackBox

vcBlackBox

    Member

  • Member
  • PipPip
  • 144 posts
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.

#6
OuTmAn

OuTmAn

    \ ( ^_^) /

  • Member
  • PipPip
  • 103 posts
(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, 06 October 2008 - 01:44 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN