MSFN Forum: %Windir% vs %SystemRoot% - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

%Windir% vs %SystemRoot% Which one is better? Rate Topic: -----

#1 User is offline   vcBlackBox 

  • Member
  • PipPip
  • Group: Members
  • Posts: 144
  • Joined: 22-September 04

Posted 08 August 2005 - 12:49 PM

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

Is one better than the other one and why?


#2 User is offline   Shark007 

  • Repackaging Specialist
  • PipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3,154
  • Joined: 07-January 04

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

This post has been edited by Shark007: 08 August 2005 - 04:22 PM


#3 User is offline   SiMoNsAyS 

  • C'mon you apes! You wanna live forever!?
  • Group: Patrons
  • Posts: 3,455
  • Joined: 17-May 04

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

#4 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

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?

This post has been edited by MHz: 08 August 2005 - 07:09 PM


#5 User is offline   vcBlackBox 

  • Member
  • PipPip
  • Group: Members
  • Posts: 144
  • Joined: 22-September 04

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.

#6 User is offline   OuTmAn 

  • \ ( ^_^) /
  • PipPip
  • Group: Members
  • Posts: 103
  • Joined: 11-October 04

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 :thumbup

very clear now, particularly due to this part:

View PostShark007, 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.

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

cheers

This post has been edited by OuTmAn: 06 October 2008 - 01:44 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy