I've done further research, finding that the icons are re-instated to the original order whenever the ^ button is pressed to see hidden quick-launch options.
That is to say, this code works just fine with 3, 5, 10 quick-launch short-cuts, provided that they are all visible on the taskbar.
It seems that as I suspected, pressing the ^ button causes windows to reload all of the short-cuts and their order. This includes both visible and hidden icons. Without researching any other previous attempts to obtain this functionality, I'd be inclined to think that the order will be stored in the registry or some other file somewhere. It seems a worthy topic to look into.
---
AH-HAH!!! - Found it. The task-bar's look and feel (including the QL toolbar) are controlled by registry keys. They're not so friendly to look at immediately, as they appear to be an ascii representation of the hex-value of each char in the key, though I imagine that they shouldn't be too hard to deal with.
Have a look
here [
^]to see a discussion about how to set up the QL bar in a pre-determined way for first-time installs. Ignore the registry-hive stuff and just concentrate on the idea of making a change, exporting the correct key and repeating the process. A quick comparison of the two versions of the same key should shed some light on which parts of the key you need to concentrate on.
Best regards & good luck!