PDA

View Full Version : Operating systems default directories



trent
24-10-2002, 09:01 AM
Hello,

Can someone please point me to or list all the default directories that windows installs into. This includes win 3.11, 95,98,me,xp, nt etc.

What I am trying to do, is to write a batch file that will delate a file created in a folder in the "windows" directory. The problem is this batch file will be run accross a range of PC's with different operating systems, and therefore I need to take into account all operating systems (i am only really worried about windows at this stage)

Cheers

Trent

Babe Ruth
24-10-2002, 09:11 AM
Trent,

For Windows NT / 2000 / XP the environment variable SYSTEMROOT points to the 'windows' directory. Therefore in a typical batch file you can use the %SYSTEMROOT% variable.

Not sure on the Win9x/ME front can check that if noone else posts.

Cheers, Babe.

Mike
24-10-2002, 09:11 AM
Usually c:\windows or c:\winnt

This does depend on the person who installs though, as you can change it to somewhere else.

Also, some files are stored in different places across the different versions.

Mike.

Babe Ruth
24-10-2002, 09:21 AM
Trent,

For Windows 9x/ME the environment variable WINDIR or WINBOOTDIR points to the 'windows' directory. Therefore in a typical batch file you can use the %WINDIR% or %WINBOOTDIR% variable.

No idea about WIN 3.x.

Cheers, Babe.

trent
24-10-2002, 10:04 AM
Fantastic,

Thanks Guys, just what I needed