missing GUIDs of control panel's subitems

delphi package - easy access to shell apis
Post Reply
Logikmensch
Posts: 17
Joined: Fri Jun 30, 2006 4:26 am
Location: Germany

missing GUIDs of control panel's subitems

Post by Logikmensch »

Dear madshi,

while browsing through the system folders using ShellObj's items, I found that most of control panel's subitems do not have a valid GUID (the ::{...} description), which is necessary for some things I want to do. They always result in the (correct) description. Example: While running the following program, I got the result shown below. But the control panel apps should be *all* have a valid ::{...} notation:

Code: Select all

var
  msg:string;
  i:integer;
begin
  msg:='';
  with ShellObj(sfControlPanel) do
    for i:=0 to itemcount-1 do
      msg:=msg+items[i].Description+' --> '+items[i].name+#13;
  showmessage(msg);
end;
and here the results:

Code: Select all

Drucker und Faxgeräte --> ::{2227A280-3AEA-1069-A2DE-08002B30309D}
Taskleiste und Startmenü --> ::{0DF44EAA-FF21-4412-828E-260A8728E7F1}
Tragbare Mediengeräte --> ::{640167B4-59B0-47A6-B335-A6B3C0695AEA}
Ordneroptionen --> ::{6DFD7C5C-2451-11D3-A299-00C04F8EF6AF}
Netzwerkverbindungen --> ::{7007ACC7-3202-11D1-AAD2-00805FC1270E}
Schriftarten --> Fonts
Verwaltung --> Administrative Tools
Geplante Tasks --> ::{D6277990-4C6A-11CF-8D87-00AA0060F5BF}
Scanner und Kameras --> ::{E211B736-43FD-11D1-9EFB-0000F8757FCD}
Eingabehilfen --> Eingabehilfen
Software --> Software
Anzeige --> Anzeige
Hardware --> Hardware
Internetoptionen --> Internetoptionen
Regions- und Sprachoptionen --> Regions- und Sprachoptionen
Gamecontroller --> Gamecontroller
Java Plug-in  --> Java Plug-in 
Maus --> Maus
Tastatur --> Tastatur
Sounds und Audiogeräte --> Sounds und Audiogeräte
Benutzerkonten --> Benutzerkonten
Energieoptionen --> Energieoptionen
System --> System
Telefon- und Modemoptionen --> Telefon- und Modemoptionen
Datum und Uhrzeit --> Datum und Uhrzeit
Sprachein-/ausgabe --> Sprachein-/ausgabe
SoundMAX --> SoundMAX
Mail --> Mail
Iomega Active Disk --> Iomega Active Disk
SAPConsole Administrator  --> SAPConsole Administrator 
SAP-Konfiguration --> SAP-Konfiguration
BDE-Verwaltung --> BDE-Verwaltung
Automatische Updates --> Automatische Updates
Network Identity --> Network Identity
NVIDIA nView Desktop Manager --> NVIDIA nView Desktop Manager
Indeed, if I use the .GUID function of that items, I get the result {00000000-0000-0000-0000-000000000000} on all of those items, which have no GUID in my above list. Is this correct?

Kindest regards,

Claus.
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

To be honest, I'm not sure whether they all really have their own GUID in the shell object system. Since asking the GUID of some of those items works fine, it seems to me that it's probable that the items without a GUID really have no GUID.

But of course I could be wrong. Do you have a specific item which you think *should* have a GUID?

What are those "some things I want to do" which you need the GUID for?
Logikmensch
Posts: 17
Joined: Fri Jun 30, 2006 4:26 am
Location: Germany

Post by Logikmensch »

Dear madshi,
To be honest, I'm not sure whether they all really have their own GUID in the shell object system. Since asking the GUID of some of those items works fine, it seems to me that it's probable that the items without a GUID really have no GUID.
Yes, indeed. You are completely right! Only those control panel apps have a GUID that have sub-items. Sorry, but that is completely new for me, I thought that all control panel apps must have GUIDs too. :oops:

With 'some things I want to do" I meant for example opening the explorer context popup and showing an icon for these apps (for list view, tree view etc.). As my workaround for the .GetIcon(16) problem, using SHGetFileInfo, I do need a real path (or valid GUID), I suppose I cannot get icons for these control panel applications. May be there's another solution for that...

Kind regards,

Claus.
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Does madShell give you correct icons (of course currently still in the wrong size)?
Logikmensch
Posts: 17
Joined: Fri Jun 30, 2006 4:26 am
Location: Germany

Post by Logikmensch »

Dear madshi,

indeed, for some of the control panel applications and -folders I get an icon by ShellObj. Most of the apps who have no GUID, have no icon, e.g. "Eingabehilfen" (don't ask me for the english word :D ) or "Mouses" etc. have no icon.
The ShellControls from the Delphi "Samples" palette (e.g. ShellListView) can show icons for all things, as well for the control panel and all subitems; but their source is very hard to understand. :oops: Unfortunately I did not yet completely understand the connection between icons and GUIDs/ItemIDLists, and the connection between ShellObj and ItemIDLists, only about 10% or so. Therefore, I'm unable to find the problem. I suppose, you will. :wink: You have such a good knowledge about all that stuff...

Good luck,

and thanks in advance for your help.

Claus.
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Ok, I'll have a look at this later this week.
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Here's a new build:

http://madshi.net/madCollectionBeta.exe

IShellObj.GetIcon should now work for all control panel items.
Logikmensch
Posts: 17
Joined: Fri Jun 30, 2006 4:26 am
Location: Germany

Post by Logikmensch »

Dear madshi,

Anything works perfectly now. I also tested it on Windows 98 and XP. Correct icons and texts. I suppose you will make a regular release of madCollection next time.

So thanks for the good (and fast) work!

Claus.
Post Reply