Hacker News new | past | comments | ask | show | jobs | submit login

>To Access the old devices and printer use the run prompt and type the following: shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}

This is the finest advertisement for every OS not named Windows that I have ever seen.




It's just a GUID. They're a good thing and very useful.

Spoiler alert, your Linux systems probably use them too:

  [lammy@emi] blkid        
  /dev/mapper/nvme0n1p5_crypt: UUID="RjKq3i-w2ov-ZXcp-Uc60-Ylzp-Gc56-xtjpkg" TYPE="LVM2_member"
  /dev/mapper/mint--vg-root: UUID="4d5373f4-d9e2-4787-98d8-24c33a1574b7" TYPE="ext4"
  /dev/nvme0n1p1: UUID="d6b28757-9cd9-44a5-b68a-25515537e540" TYPE="ext4" PARTUUID="bc0382eb-01"
  /dev/nvme0n1p5: UUID="19104716-2c1f-4e92-8c75-35b113d9ecae" TYPE="crypto_LUKS" PARTUUID="bc0382eb-05"
  /dev/mapper/mint--vg-swap_1: UUID="dbfcbc11-37c2-4752-9f8f-6288aa7e8b43" TYPE="swap"

And FreeBSD:

  [lammy@popola] gpart list|grep uuid
    rawuuid: c345aeb1-1dde-11e9-a10e-0cc42afa3cea
    rawuuid: c350c1ee-1dde-11e9-a10e-0cc42afa3cea
    rawuuid: c359c46d-1dde-11e9-a10e-0cc42afa3cea
    rawuuid: c3601e82-1dde-11e9-a10e-0cc42afa3cea

And probably others but this is what I have on hand lol


I don't think the OP meant to piss on GUIDs. I think they are laughing at a very cryptic command line recommended to access "old devices and printer". That was always a classic jab at Linux and this looks extra cryptic as it is a literal random string.

Also UUIDs in the classic sense do suck in my opinion and Linux and FreeBDS use them, because they have to, to support standards that were made with Windows in mind. UUIDs are strange - i.e. their mixed endianess or how version bits are placed in them. All for a 128 bit random identifier as it is mostly used nowadays. I like the below to get a random identifier:

    __uint128_t random;
    char id[17] = {0};
    getentropy(&random, sizeof(random));
    for(int i = 0; i < 16; i++) {
        id[i] = 'a' + ((random >> i) & 0xf);
    }
This gives a 16 character identifier, like: pphlfcjmophlnohl

Chrome Web Store uses something similar.


I think it's kinda nice that my random identifiers have a little flag bit to indicate they were random v(._. )v

> their mixed endianess

Pardon my pedantry here but this is a misinterpretation of GUIDs through the lens of the UUID structure. The actual difference between GUID and UUID isn't the endianness-on-the-wire within the chunks but the number and sizes of the chunks themselves.

GUIDs are [32 bits, 16 bits, 16 bits, [8, 8, 8, 8, 8, 8, 8, 8] bits].

UUIDs are [32 bits, 16 bits, 16 bits, 8 bits, 56 bits].

Endianness only matters with multi-byte data, so the "mixed-endianness" thing comes from the fact that the two specs mostly line up, but then people interpret GUID's array of octets as if ⅞ of it were a single multi-byte field as it is in UUID.

> or how version bits are placed in them

Indeed this is mostly lost to time and seems like odd placement these days. For anyone who's curious, the reason why those bits are where they are is because the Apollo Network Computing Architecture "version 0" UUIDs had a different third layout where the ninth octet indicated socket address family. IP's dominance led to the ossification of AF numbers which did not keep growing as anticipated, leaving several bits of effectively wasted space that were then reused to indicate the version since those bits could always be assumed to be 0 on NCA/NCS due to lack of any network standard on which they could be anything else.

Source: wrote a GUID/UUID library that implements all the old weird shit just for the fun of it:

  irb> GlobeGlitter::from_gregorian_time.inspect => "#<GlobeGlitter 01eed42e-d812-1db0-0f52-00e04c180069>"
  irb> GlobeGlitter::from_ncs_time.inspect => "#<GlobeGlitter 3cd0b18cbd50.02.00.00.e0.4c.18.00.69>"


I think it's not the GUID, but the fact that referencing the GUID is the only way to get at the functionality any more.

Yes, your devices and various other underpinnings have GUIDs, but very few of them _only_ surface the GUID as a referent to the thing in a place a user would have to access it.

Similar to how, if you could only get at this by doing "rundll32 shellex.dll LoadOldPrinterSettings", the issue wouldn't be a function named LoadOldPrinterSettings, the issue would be that it's making you reach into a DLL to invoke a function by hand to get at it at all.


As noted in TFA comments, `control /name Microsoft.Printers` also works.


That's the most ironic twist, I'm using more command line on a windows install than a modern Linux distribution nowadays.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: