There are only twelve function keys, and who says there’s somebody there to push them?


One of the proposals for adding hidden features to Windows Setup is to have a bunch of hidden function keys, one for each hidden option. Well, first of all, there are only twelve function keys and there are way more than twelve possible Setup features. (Yes, there may be a few function keys still active during Setup, but they exist only for compatibility purposes. No new Setup features involve function keys as far as I'm aware. And yes, there are keyboard layouts with more than twelve function keys, but think about what you're saying in context: "Yes, Setup should use function keys that are not available on most keyboards.")

Furthermore, there's no guarantee that there's somebody sitting in front of the computer when it's running Setup. Indeed, 90% of the time, there is nobody there at all; Setup is running on a factory floor somewhere churning out computers day and night.

Adding a command line option to Setup also runs you into problems: The command line gradually gets bloated with a bajillion options. After taking your several dozen customizations and cramming them onto the command line, you'll find yourself having to type 500 characters onto the command line to get what you want, and woe unto you if you typo one of those 500 characters. Can you imagine if somebody said, "To set up Windows the way I like, I simply type the following command," followed by a command that goes on for six lines? "This is total crap. I'm expected to type this monstrosity?"

Windows Setup for quite a long time has supported so-called unattended installation. You build a so-called unattend file and pass it to the setup program as a single command line parameter, something like setup /unattend:unattendfile. (I forget the command line exactly; you can go look it up yourself.) Now somebody can post their favorite settings onto their Web site, and you can download it and pass it to Setup.

For many years, this unattend file took the form of an INI file, with [Sections] and Key=Value entries. In Windows Vista, the Setup folks threw away the old parser and switched to XML. Because XML is the wave of the future, right? (I can imagine Steve Ballmer jumping up and down shouting "XML! XML! XML!") I don't know whether they've actually done it, but in principle, the switch to XML means that they can write a schema for the unattend file, and then all the standard XML validation tools become available.

Comments (39)
  1. Karellen says:

    "Indeed, 90% of the time, there is nobody there at all; Setup is running on a factory floor somewhere churning out computers day and night."

    Why would anyone have Setup run this way at all? Why not just blindly blit an image straight to the disk?

  2. mvadu says:

    http://support.microsoft.com/kb/314459

    Gives more info about so-called unattended installation.

  3. Luc Rooijakkers says:

    Karellen: Because there are massive issues with image blitting. Can you say device detection, SID generation, customized harware setups, etc? AFAIK Microsoft does not officially support Windows being "blitted" from machine to machine, although it can be made to work in sufficiently controlled circumstances and with the right tools.

  4. Frymaster says:

    "so-called" implying it needs attention.  which it does, on windows 2000.  in fact, it does on XP as well: you need to press a key to boot off the CD-ROM ;)

    "Why would anyone have Setup run this way at all? Why not just blindly blit an image straight to the disk?"

    Factories probably do.  We don’t (I’m tech support) because there’s a ludicrously different number of configurations in my work, so going through the whole setup procedure is better.  Also, read up on the SP3 fiasco caused by depending on images too much ("Well, I dunno if you could use an Intel image on an AMD computer… oh look, it appears to have not immediately broke! It must be perfect in every way and have no hidden problems in the future!"

    Also, we don’t quite do full unattend – we leave in the partitioning questions at the beginning so we have more choice, especially if you’re reinstalling a machine that has a second drive you don’t want to accidentally format

    Last time I reinstalled windows at home, I forgot to remove my mp3 player / external HDD which I’d backed up some files to and it offered it as an installation choice ;)

  5. mvadu says:

    Karellen: Consider a HP/Dell factory. They have a separate license for each of the machine going out. They can not blit an image from one machine to other.

  6. Frymaster says:

    (apologies for the double post but I took too long writing the first one)

    Luc: it’s supported, as long as you run sysprep from the "master" before you clone it.  That forces SID regeneration on next boot, and I think makes the computer less likely to fall over on extravagantly different hardware.  It’ll ask you the questions you normally get asked during setup about keyboards and timezones again, too.  You can use unattend-esque options to customise this, though I don’t know if the format is the same.  Same basic idea though

  7. James Schend says:

    Why would anyone have Setup run this way at

    all? Why not just blindly blit an image

    straight to the disk?

    A whole crapload of HP laptops broke when Vista SP1 came out because HP did exactly this when setting it up. Not that HP actually gives a crap about the quality of their computers, but still– for people who do, it can cause huge problems.

    I love questions of the general form:

    "Why do what a person of authority recommends I do, why not just do my own thing?"

  8. blah says:

    Raymond better hope Ballmer doesn’t catch wind of this post.

  9. Tom says:

    mvadu: For OEM licenses, the license key is simply a sticker.  The images are identical for every PC of the same make/model (obviously, there are still driver differences).

    To go back to the function key problem — many people seem to forget that there are such things as slate Tablet PCs, which have no keyboards.  The TIP soft keyboard doesn’t have any function keys.

    Using a Tablet PC will clue you in a little bit to the massive amount of work that Microsoft does to ensure compatibility across different configurations.  Java Swing is the worst for Tablet compatibility — doesn’t pick up double-clicks.

  10. Stefan Kanthak says:

    @Frymaster:

    zero the MBR of the "first" harddisk (or remove the i386BOOTFIX.BIN file from your CD) and the "Press any key to boot from CD-ROM" is gone!

  11. There are also three modifier keys, which can be pressed (or not) in eight ways… which gives you 48 combinations.

    And 48 combinations ought to be enough for anybody… right?  Right?

    There’s already precedent for this with the Shift-F10 "open a command prompt during Setup" trick:

    http://geekswithblogs.net/lorint/archive/2006/11/22/97794.aspx

  12. Mikkin says:

    Meh, you really only need one key … and a working knowledge of Morse code.

  13. mike says:

    I am very pleased that you are using "typo" as a verb.

  14. Dale says:

    "Why would anyone have Setup run this way at all? Why not just blindly blit an image straight to the disk?"

    Because Imaging straight to disk has never really been supported by Microsoft, because if you do it wrong, you have an unsupported operating system.

    (http://support.microsoft.com/kb/314828)

    Sure, you can Sysprep the machine, but by that stage, your processor make has been chosen.

    The other issue with imaging is that some vendors products have issues with it.  Yes, I’m talking about you Computer Associates, with your eTrust AV & Unicentre Software Delivery products.

    An unattended installation file gives us choice, and choice IS a good thing in this case.

  15. asymtote says:

    Why is something of the complexity of XML used for a simple config file? Ini files do not need to be more complex than ini files. To use your example, "Why do I have to type all this XML crap when all I want to do is write an ini file". Jeez.

  16. Karellen says:

    "Can you say device detection"

    Uh yeah. Ship all drivers. Kernel detects devices at boot, goes "oh, there’s a Foomatic video card and a Bartastic sound card, I’ll load the drivers for those devices and ignore the drivers for which no hardware is present". What’s so hard about that? Don’t you kind of need that anyway for generic device hotplug detection? ("Oh, there’s a USB mass storage device. Better load the driver for that. Oh, new generic postscript printer. Load the driver for that." etc…)

    "SID generation"

    Blittable image has no Administrator account/SID. On boot, Windows goes "Oh, no Admin account. Better create one including its SID, and change the ownership of all files in $WINDOWSDIR to new Admin SID." Again, this will help if someone accidentally deletes (or if a disk problem causes to be lost) the Administrator account details.

    "customized hardware setups"

    Not sure what the problem here is. See "ship all drivers" in point 1. HW manufacturer is going to know all the hardware they ship, so can include all drivers in image.

    Yes, if they’re building a completely custom rig with hardware they’ve not shipped before, they’re going to do that one by hand. But they’d have to create the install file for that computer by hand anyway, and probably part-build it by hand to put the customised stuff in.

    "by that stage, your processor make has been chosen"

    OK, so you need a different image for each CPU type you ship. Isn’t that easier than running an unattended Setup on every single system?

    Sorry, I still don’t see why blits shouldn’t work in this day and age.

    (Trying to resist cheap shot about Windows not being ready for the desktop/enterprise(delete as applicable) until this works, but am obviously unable to :-)

  17. Dean Harding says:

    "Sorry, I still don’t see why blits shouldn’t work in this day and age."

    What difference does it make if it’s an image copy or an unattended setup? It might run a bit faster, but nobody is suggesting you run the unattended setup on one computer at a time.

    You’re suggesting that changes be made to the way Windows works in order to accommodate copying images between computers. Those changes obviously have costs involved. What benefit of making those changes outweighs the cost?

    "Raymond better hope Ballmer doesn’t catch wind of this post."

    Yeah because nobody ever got anywhere in life by having a sense of humour.

  18. Dale says:

    “OK, so you need a different image for each CPU type you ship.”

    And HAL-type ;-)

    (ok, you CAN do some fancy “not-supported by MS” footwork)

    “Uh yeah. Ship all drivers. Kernel detects devices at boot”

    One customer I worked with had 30,000 desktops with 900 different hardware models.  The driver library was huge :-(

    In the end, both techniques (imaging/unattend) have their advantages, and in most cases I use both when crafting images for deployment.

    [Holy crap, a balanced perspective. How’d you get in here? -Raymond]
  19. Maurits: "There are also three modifier keys, which can be pressed (or not) in eight ways… which gives you 48 combinations."

    Math fail?

  20. jcs says:

    Karellen: What you suggest was already done in Windows Vista!!

    http://en.wikipedia.org/wiki/Management_features_new_to_Windows_Vista

    Oh wait, I forgot, I’m not allowed to say anything good about Windows Vista on this forum. Never mind…

    ""(Trying to resist cheap shot about Windows not being ready for the desktop/enterprise(delete as applicable) until this works, but am obviously unable to :-)""

    Your cheap shots would be better received if you actually understood the product that you’re shooting at.

  21. Anon says:

    All these silly "Why doesn’t Windows work like this [horrible horrible idea that would make the common case much harder but make a rare case only very slightly easier]" questions to Raymond remind me of this

    http://en.wikipedia.org/wiki/Are_You_There_God%3F_It‘s_Me%2C_Jesus

    Basically God comes back to Earth every 2000 years and will answer one question but Stan wastes the opportunity with asking something anyone could answer and gets beaten up by an angry crowd.

  22. Jeff Tyrrill says:

    Quote: "Why is something of the complexity of XML used for a simple config file? Ini files do not need to be more complex than ini files. To use your example, "Why do I have to type all this XML crap when all I want to do is write an ini file". Jeez."

    Because XML has formal support for UTF-8, has strict and standardized well-formedness and validation behavior, and has an abundance of tools to manipulate it.

    Among other things, these help eliminate unpredictable behavior (in error cases or otherwise), which greatly simplifies use and testing.

  23. Merus says:

    I used to do application packaging, and so I’ve run into a lot of pain with applications that refuse to install silently. Program XYZ‘s easily the worst – the amount of work you have to do to get it to install silently, with all the little hooks it insists upon installing, is horrid.

    And blitting doesn’t really work because it’s extremely inflexible if a computer configuration is even slightly different. And if you’re going to put all this special case stuff to repair a dodgy blit, you’re not getting much benefit over reusing your manual install code.

  24. DC says:

    After taking your several dozen customizations and cramming them onto the command line, you’ll find yourself having to type 500 characters onto the command line to get what you want, and woe unto you if you typo one of those 500 characters. Can you imagine if somebody said, "To set up Windows the way I like, I simply type the following command," followed by a command that goes on for six lines? "This is total crap. I’m expected to type this monstrosity?"

    Been there, seen that: http://www.bash.org/?464385

  25. Worf says:

    When I setup up my Sony UX UMPC, I reinstalled the custom version of Vista on it to remove all the junk that Sony shipped, but still have all the drivers and necessary customizations.

    An interesting thing was the recovery process (which you interrupt) after restoring Vista, runs and tries to install all the apps on the recovery, then it scripts a Sysprep to "re-seal" Vista. I only found this when following the "how to get a nearly crap-free recovery" installation, which involved ejecting the recovery media during first boot, halting recovery, which then causes sysprep to launch and wait to do something.

    Interestingly, too, the first boot took over an hour and ended in a reboot. As if Sony basically made one master image that customizes itself on first boot – installing drivers, apps, and then running sysprep. So there’s a way to do one image and support practically any configuration…

  26. Jonathan says:
    1. Blitting is indeed an option, but you have to sysprep the source drive before blitting, which removes all the machine-specific stuff from it – SIDs, users, license, hardware, etc. Then, Windows goes through a phase called "mini-setup", where you’re asked the same questions like you would with normal setup. You can provide sysprep.inf, which is the same format like unattend.inf.

    Of course, you could just have an unattended setup with unattend.inf, and forget about the blitting. The blitting option was faster in Windows 2000/XP/2003.

    In Vista/2008, the 2 options are actually one: Setup-from-DVD actually asks a few things, blits a "syspreped" image to the HD (from a huge source.wim), puts sysprep.xml (or something) there, and then the image goes through mini-setup. So there’s little difference between the 2 options anymore.

    1. The are pros and cons to inf vs. XML. IMO, the best thing about XML is that it defines all the little things the inf doesn’t – charset, whitespace, etc. It is also easily manipulated programatically from any reasonable programming environment. It is more verbose though.

    2. The requirement to have "magic keys" during setup is for installing straight from the CD, where you don’t have anywhere to put an unattended.inf/xml, or type a commandline. A nicer options would be like the boot-time F8, which shows a menu with options. For example, Vista setup lets you load a mass-storage driver with a GUI – and you can point to a diskette / USB drive / whatever. This is a definate improvement over the "A: only" XP behavior.

  27. pingpong says:

    @Calculator:

    Care to explain your reasoning?

  28. BryanK says:

    The basis of 8 isn’t right, though.  Here’s the list:

    12 function keys on their own (no modifiers)

    12 function keys with shift

    12 function keys with alt

    12 function keys with ctrl

    12 function keys with ctrl+alt (no shift)

    12 function keys with ctrl+shift (no alt)

    12 function keys with alt+shift (no ctrl)

    12 function keys with ctrl+alt+shift.

    That’s actually 96, assuming I can multiply.

    Of course, whether using these modifiers is actually a good idea or not is another question entirely.  I bet it isn’t…

  29. Bryan says:

    Karellen:

    You should also understand the product from which you are basing your cheap shot.

  30. Aaargh! says:

    "What benefit of making those changes outweighs the cost?"

    You can install *all* computers (not just 1 model) from a single image, you don’t have to reinstall Windows every time you upgrade your hardware, you don’t have to insert the Windows CD every time you install some hardware just so windows can look for the driver, you can just load the driver instead of nagging the user with prompts for disks, etc. etc.

    Modern OSes do this all the time. A certain OS from a certain company named after a certain piece of fruit can even boot the same disk image on PPC and x86 machines.

  31. Calculator says:

    @ Michael Mrozek: Math Fail?

    try 8 * 3 * 2

  32. I made a follow-up post immediately after my "48" post with the single line "s/48/96/g".  Apparently it got eaten by a grue.

    Anyway, 96 is correct (12 * 2^3).

  33. apz says:

    >> @Calculator:

    >>

    >> Care to explain your reasoning?

    8 * 3!

    = 8 * 3 * 2 * 1

    = 48

  34. Karellen says:

    "Your cheap shots would be better received if you actually understood the product that you’re shooting at."

    Hey, I was trying to understand the product. That’s why I *asked* why people didn’t do the obvious thing $FOO that other modern OSs have no problems with.

    If everyone else wasn’t misinforming me about Windows by telling me it can’t do $FOO when it can, the bogus cheap shots wouldn’t present themselves.

    Sheesh. :-p

  35. Igor Levicki says:

    You mean, jumping up and down like this?

    http://www.egg-attack.com/ ;)

  36. Michiel says:

    Let’s be fair to the original idea. The problem at hand was pre-existing data on disk during a setup. It doesn’t matter that 90% of the setups are unattended – those are first installs of Windows on a new PC. If there was user data on the disk, it’s perfectly OK to wait for user input. It’s in fact a bad idea *not* to wait. How many of the other 499 options fall in that category?

  37. Dale says:

    "[Holy crap, a balanced perspective. How’d you get in here? -Raymond]"

    Well cause I’ve been there, done it and made lots of mistakes :-)

    Some solutions which work perfectly well for 1, 5, or 20 PCs just don’t scale out.  Be it desktop SOE deployment, or software/patch management.

  38. 640k says:

    You should also understand the cheap product from which you are basing your shot.

    Is the function keys and there functions documented somewhere?

  39. Yuhong Bao says:

    "but by that stage, your processor make has been chosen."

    To be more precise, the processor driver has been already chosen. BTW, can you disable all processor drivers before you sysprep?

Comments are closed.

Skip to main content