1

i'm on Windows XP and want to read with C# all the Quicklaunch Items (in the taskbar next to the window button).

I found the "solution" to read all files from "C:\Documents and Settings\USER\Application Data\Microsoft\Internet Explorer\Quick Launch"

But i want the same order as in the quicklaunch bar.

Anyone can help me?

cheers

N West
  • 6,768
  • 25
  • 40
cyptus
  • 3,346
  • 3
  • 31
  • 52

2 Answers2

1

Location of the Quick Launch folder

If the user has chosen to add the Quick Launch shortcut, we need to determine the location of the folder where we will create the shortcut. The functionality of the Quick Launch bar is part of Internet Explorer and the location of the folder for the Quick Launch shortcuts is part of Internet Explorer's application data. There is no "All Users" Quick Launch folder, so the Quick Launch shortcut is always added to the current user's Quick Launch folder, even if the user chooses to install for "Everyone".

The System.Environment.GetFolderPath method we used to find the current user's Desktop can also give us the location of the current users "Application Data" folder. We need to hardcode the location within the Application Data folder for the Quick Launch folder. In the demo project I have made the location of the Quick Launch folder a property of the ShortcutsInstaller class so that I do not need to repeat the location code in more than one place. The code for the location of the Quick Launch folder is:

private string QuickLaunchFolder
{
  get
  {
    return
      Environment.GetFolderPath(
         Environment.SpecialFolder.ApplicationData)
         + "\\Microsoft\\Internet Explorer\\Quick Launch";
  }
}

You can go to this link it will guide you out Link


Another way would be simple and steady.

string apploc = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string []files =Directory.GetFiles(@apploc+@"\Microsoft\Internet Explorer\Quick Launch");
//Loop the string "files" in which every way you want.
for(int i=0 ; i<files.Length; i++)
{         MessageBox.Show(files[i]);       }

I hope this is what you need.

MDMalik
  • 3,951
  • 2
  • 25
  • 39
  • yes nice - but i dont wanna create a shortcut. i want to read all existing shortcuts in the right order (not the order in the file explorer, i want the order how it is in the taskbar.) – cyptus Mar 13 '12 at 11:55
  • Try the bottom one. i guess dats what you want. – MDMalik Mar 13 '12 at 12:31
  • Hi, thanks for answering. No, thats not what i need. Thats exactly that what i wrote in first post. I know that i can find the applications there, but i want it in the right order! If i read the files from the directory i dont have the same order as the icons from left to right in my taskbar.. – cyptus Mar 13 '12 at 12:48
1

The quick launch sort order is stored as a binary value TaskbarWinXP here:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop

You would need to reverse engineer the binary to get the sort order.

79E09796
  • 2,120
  • 1
  • 20
  • 33
  • You could try saving the value, then reordering the quick launch items. By comparing the new value you might be able to figure it out, but it won't be easy. – 79E09796 Mar 13 '12 at 14:31
  • your right, i thougt so too. i will try this later. after a little look at the content, i saw that i can read the filenames and some paths out of it. maybe it wont be very hard to read the position. i will post, if i'm successfully. – cyptus Mar 13 '12 at 15:13