Date: | October 8, 2004 / year-entry #362 |
Tags: | history |
Orig Link: | https://blogs.msdn.microsoft.com/oldnewthing/20041008-00/?p=37623 |
Comments: | 18 |
Summary: | If the system directory is always %windir%\SYSTEM32, why is there a special function to get it? Because it wasn't always that. For 16-bit programs on Windows NT, the system directory is %windir%\SYSTEM. That's also the name of the system directory for Windows 95-based systems and all the 16-bit versions of Windows. But even in the 16-bit world,... |
If the system directory is always Because it wasn't always that. For 16-bit programs on Windows NT, the system directory is But even in the 16-bit world, if it was always Because even in the 16-bit world, it wasn't always Back in the old days, you could run Windows directly over the network. All the system files were kept on the network server, and only the user's files were kept on the local machine. What's more, every single computer on the network used the same system directory on the server. There was only one copy of USER.EXE, for example, which everybody shared. Under this network-based Windows configuration, the system directory was a directory on a server somewhere (\\server\share\somewhere) and the Windows directory was a directory on the local machine (C:\WINDOWS). Clients did not have write permission into the shared system directory, but they did have permission to write into the Windows directory. That's why |
Comments (18)
Comments are closed. |
"Back in the old days, you could run Windows directly over the network. "
Was this true for Windows for Workgroups too? I thought the filesharing itself depended on Windows to work.
mschaef,
It was possible to "mount" SMB filesystems to DOS drive letters from the DOS command prompt before Windows was loaded. I often made use of this feature since back in those days I wasn’t really much of a Windows fan and preferred to do things in DOS.
Nope. Netware and the other raft of lans ran under DOS, so windows basically depended on that for its networking.
another reason could be mono. on a linux system this will look completely differnet!
bye marco
Too bad there’s no environment variable for it though.
I did that. We had the whole building running the same system files. Seems backward to many today.
system on network
files on local
So would it be unwise to assume for the future that the System32 is the directory? Is it still System32 for 64bit Windows?
Probably. Would you rather hardcode your apps now and have them break later?
I’m pretty sure Raymond mentioned a while back that in Win64 it’s still called "system32" to ensure (wait for it…) backward compatibility.
So we know why the function exists. Should we use it rather than the variable?
Keep using the function.
Is there any valid reason to use SHGetFolderPath(…, CSIDL_SYSTEM, …) in place of GetSystemDirectory?
CSIDL_SYSTEM just calls GetSystemDirectory. It’s there more for completeness than to provide new functionality. (For example, since you can use CSIDL values in INF files, this lets you use the system directory from an INF file.)
Raymond,
How complete is the Application Compatibility Toolkit for stuff like this? (I used to be guilty of using the registry for getting "My Documents" until your post on the subject since you actually explained why things were the way they were :-)
For those who don’t know, the ACT is supposed to check your app by running it and seeing what you do wrong. It is at http://www.microsoft.com/windows/appcompatibility/toolkit.mspx
For some bizarre reason the download page now tries to make you verify that your copy of Windows is genuine, but you can bypass that. (My copy was bought at the MS employee store so it had better be genuine :-)
Actually it doesn’t force you to validate – it just offers validation as an option.
I miss those days. Why cannot one run NT from a server?
You can run NT from a server. The product you want is Windows XP Embedded, where you can choose exactly what OS components you want, and can run off flash or over the network, as well as a good old fashioned hard disk.
Any comments on the ‘immutability’ of the system directory?
Once got a complaint about a Win3.1 program which wrote data to the system directory, we had to change it to the Windows directory (it was appropriate there, though I forget the data).
So now it’s always irksome to find that there is a ‘system32logfiles’ directory. How can you have a writable directory inside what is potentially a read-only and/or remote network shared directory? (I’m sure it’s because the requirements have changed, but when?)