Dark Times

Dark Times

63 comments · 95% upvoted · source · other discussions

comments

Bot-Magnet

Who even remembers where to find the A drive anymore?

cmd_iii

There's a generation of people, completely computer-literate, who have no idea why the main hard drive in their computer starts with "C:\"

CrypticButthole

Mkay. I'm taking Systems Administration courses, and I'm a little ashamed to admit I don't know what C stands for. I'm not sure we covered it in my Windows Desktop class, maybe in the Windows Server class? Fuck, now I feel dumb.

delocx

Early versions of MS-DOS assigned drive letters as follows: the first floppy disk drive was assigned A, the second (if present) was assigned B, the first primary active partition of the first physical disk was assigned C, and so on. Two floppy drives were common because there were several floppy disk standards in use at the time. The rest is a mixture of legacy support (many early programs, and some more recent poorly coded ones, directly referenced a drive letter), and no real need to change it. You can open up your Windows Disk Management and assign drive letters A and B to basically any storage device and it will work just fine; there's only a few very niche times when that might cause a problem, usually with something really old.

Fun little fact, there's nothing that says that a drive (except the OS drive) has to be mounted to a drive letter. You can mount a drive within the folder hierarchy just like you see with Linux or BSD derived OSes.

CrypticButthole

Ahhh! I wasn't as uninformed as I thought I was! I figured it was due to ordering of drives on legacy systems. I had thought you were saying the C actually meant something, and I was digging through my mind trying to figure it out but drawing a blank. Thank you!

delocx

Nope, entirely arbitrary, like a lot of things Windows does...

cmd_iii

It's probably been left that way in the interest of backward compatibility. Like you said earlier, some of the really old apps/games/etc. are expecting A:\ and B:\ to be floppy drives (3.5" or 5.25", depending), C:\ to be the root of the main hard drive, and D:\ (and sometimes E:\) to be CD-ROM drive(s). You also had tape drives, Zip drives, and other storage devices that you had to assign letters to (usually in the BIOS). If you found one of these old devices, and wanted to know if there were data on it, you'd have to hook it up, probably with an adapter (I don't think computers even have serial ports anymore), and assign a drive letter to it.

A lot of places aren't even including removable drives of any sort on their work computers, due to security concerns. My new work computer doesn't even have a CD-ROM drive on it. There are USB slots, but I think they're all disabled in terms of being able to transfer data through them. But, I can map any letter I want to a directory on the server, including A:\ and B:\.

Well, except C:\, of course. That one's already in use.

CrypticButthole

I wrote a program in C++ that uses C:\Windows\Fonts hardcoded. Is there a way to remove the reliance on the C:\ drive holding the Windows directory? %SystemRoot% comes to mind but I don't think that's correct.

[deleted]

%SystemRoot%\Fonts

should be it.

CrypticButthole

Rhighto. And fopen("%SystemRoot%\Fonts\Arial.ttf") would expand %SystemRoot% correctly?

(I could test it, but I don't want to power on my laptop...)

[deleted]

Ah, using it there, not sure. Probably not. (It would be too easy.)

https://stackoverflow.com/questions/4130180/how-to-use-vs-c-getenvironmentvariable-as-cleanly-as-possible

Looks like you call GetEnvironmentVariableW and pass in "SystemRoot".

Riegel_Haribo

Registry [HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\

"Fonts"="C:\Windows\Fonts"

CrypticButthole

Hmm. It seems extremely inefficient to check the registry for the full fonts directory. I'm more concerned about \Windows\ being mounted elsewhere than C: than \ShellFolders\"Fonts" being set to something else. And does that registry entry update when \Windows\ is mounted to, say, Z:?

Riegel_Haribo

Windows doesn't just get "mounted" to Z: I don't even know that you'd be able to change the default installation directory on windows 10 these days; every update it reinstalls itself and just poorly copies back your settings. Making your own installation directory such as D:\win was dying by windows 98, usually just if you had done many upgrades from 3.1.

Riegel_Haribo

A lot of PCs assigned the drives as follows:

5 1/4" floppy #1: Included

5 1/4" floppy #2: Optional

10MB hard disk: Way expensive; MFM adapter not included