A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Changing a filetypes icon - adding a"shortcut" like mini-icon



 
 
Thread Tools Display Modes
  #16  
Old October 30th 20, 08:45 PM posted to microsoft.public.windowsxp.general,alt.windows7.general
Mayayana
external usenet poster
 
Posts: 6,438
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

"Ed Cryer" wrote

| Do you mean "an icon pointing to another icon"? And, if so, how does
| your mew .ovl extension fit into this schematic?
|
| As far as I can work out, you can't have an icon pointing to an icon.
| Windows isn't built for that.
|
| In this situation you'd be well advised to delineate what you're trying
| to do more explicitly.
|

Find an EXE file. Right-drag it. Select Create Shortcut Here.
See how it's the same icon but now has a black/white
arrow in the corner? That's the shortcut icon, which can
be changed because it actually is an icon, overlayed on
top of the shortcut icon. In other words, Fireefox.exe
doesn't have a shortcut icon inside it. A shortcut is made
by using the Firefox icon and then adding the system icon
shortcut. (On my system, for example, I have a small
turquoise up arrow on shortcuts. I find the system version
looks garrish.)


Ads
  #17  
Old October 31st 20, 03:50 AM posted to microsoft.public.windowsxp.general,alt.windows7.general
JJ[_14_]
external usenet poster
 
Posts: 46
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

On Fri, 30 Oct 2020 11:35:11 +0100, R.Wieser wrote:
Hello all,

I would like to know if its possible, thru changes in the registry, to
change a filetypes icon. No, not just change the icon itself, but to either
:

Add a shortcut-like mini-icon into one of the other corners

-or-

Change the filetypes icon to a fixed one, but display the files own icon as
a min-icon in one of the corners.

If you wonder what its for, I intend to create an ".ovl" (overlay) filetype
(for likely a simple executable or DLL), and want be able to see at a glance
that 1) its an overlay 2) which program its for (displaying that or its own
resource icon).

Does anyone have an idea ? I've already looked in the registry to how it
workss for an actual shortcut, but that didn't give me the clue(s) I needed.

Regards,
Rudy Wieser


If by modifying the registry only, that'll be a no.

The small-arrow overlay icon which is displayed for *.lnk shortcut files is
a predefined feature (including predefined icon).

As Mayayana have mentioned, that small-arrow overlay icon can be enabled
using the `IsShortcut` registry value. However, while it can be applied to
any file type, the associated application icon failed to be shown because
that predefined feature requires a Shell Icon Extension. The `DefaultIcon`
registry value is not used in this case, because the base icon depends on
the linked file type (thus, can not be fixed). Aside for offline files,
Windows has one built in specifically for *.lnk files, and it won't work for
any other file type.

For custom icon overlays, it's only possible using Shell Icon Overlay
Extensions - which are listed under below registry key (long text warning).

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Explorer\ShellIconOverlayIdentifiers
  #18  
Old October 31st 20, 06:40 AM posted to microsoft.public.windowsxp.general,alt.windows7.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

JJ,

If by modifying the registry only, that'll be a no.


Drats!

As Mayayana have mentioned, that small-arrow overlay icon can
be enabled using the `IsShortcut` registry value.


Yep.

However ... the associated application icon failed to be shown
because that predefined feature requires a Shell Icon Extension


I had a bit of a brainfart and created the two registry entries for a
filetype (".aaa" and "aaafile"), added "IsShortcut" to the latter, took my
cue from the "exefile" registry entry and also added a "defaulticon" key
with @="%1". The result is that both an executable and a dll with resource
icon renamed to .aaa still show their seperate icons - together with the
shortcut overlay icon ofcourse.

IOW, for just the showing of the associated application icon the Shell Icon
Extension does not seem to be needed.

For custom icon overlays, it's only possible using Shell Icon
Overlay Extensions - which are listed under below registry
key (long text warning).


Yup, that is what I also arrived at (took a hint from the "lnkfile" registry
entries "iconhandler" key and googled my way thru).

Maybe I'll try to create one of them. Not sure if its worth the trouble ...

Regards,
Rudy Wieser


  #19  
Old October 31st 20, 10:47 AM posted to microsoft.public.windowsxp.general,alt.windows7.general
Ed Cryer
external usenet poster
 
Posts: 2,621
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

Mayayana wrote:
"Ed Cryer" wrote

| Do you mean "an icon pointing to another icon"? And, if so, how does
| your mew .ovl extension fit into this schematic?
|
| As far as I can work out, you can't have an icon pointing to an icon.
| Windows isn't built for that.
|
| In this situation you'd be well advised to delineate what you're trying
| to do more explicitly.
|

Find an EXE file. Right-drag it. Select Create Shortcut Here.
See how it's the same icon but now has a black/white
arrow in the corner? That's the shortcut icon, which can
be changed because it actually is an icon, overlayed on
top of the shortcut icon. In other words, Fireefox.exe
doesn't have a shortcut icon inside it. A shortcut is made
by using the Firefox icon and then adding the system icon
shortcut. (On my system, for example, I have a small
turquoise up arrow on shortcuts. I find the system version
looks garrish.)



That is quite brilliantly explained, man. You have a high talent for
clear exposition.
Thank you.

Ed

  #20  
Old October 31st 20, 11:37 AM posted to alt.windows7.general,microsoft.public.windowsxp.general
Ed Cryer[_3_]
external usenet poster
 
Posts: 1
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

R.Wieser wrote:
Ed,

Do you mean "an icon pointing to another icon"?


Huh? No.

Take look at a shortcut. See that it shows the icon of the file its a
shortcut for *but also* an overlay-icon that looks like a small white
rectangle with a bend black arrow in the lower-left corner ? That is what
I'm after - to add such an overlay icon for an .ovl filetype.

In this situation you'd be well advised to delineate what you're trying to
do more explicitly.


:-) I can do my stinking best in trying to explain what I'm after and
making direct references to something similar (a shortcut), but I can't
understand it for you I'm afraid.

I from my position have absolutily /no/ idea how you could come to a "do you
perhaps mean an icon pointing to another icon?". An icon simply /can't/
point anywhere - other than by showing an arrow of some kind. And that only
means something to a human.

Regards,
Rudy Wieser




Ah, light dawns.
Well, you can certainly remove the little arrow, and even put it back
again, using Ultimate Windows Tweaker, or with a regedit as explained here;
https://www.windowscentral.com/how-g...ows-windows-10

But to go further you’d have to tinker with Windows core, and that would
create more problems than benefits. Any future change, any update, would be
in danger of failing, and, at best, would simply wipe out your change.

Do some lateral thinking. Backtrack on your problem and look for other
avenues of approach.


--
Ed
  #21  
Old October 31st 20, 12:51 PM posted to microsoft.public.windowsxp.general,alt.windows7.general
Mayayana
external usenet poster
 
Posts: 6,438
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

"R.Wieser" wrote

| Maybe I'll try to create one of them. Not sure if its worth the trouble
....
|

I didn't know about those. Looking in 1998 and Win7
MSDN I don't find any mention of them. But I had one
registered on my XP box -- Client Side Caching UI - cscui.dll.
I had disabled it in Autoruns. I don't remember why. But I
do like to disable unnecessary crap that MS likes to add.
(I still find myself disabling Windows Media Player
Launcher and Windows Messenger even though I removed
them many years ago.)

It's a COM shell extension that does things like putting a lock
overlay on restricted folders -- specialty uses. Companies
like Dropbox also use them. It's not clear to me whether
they can be used on files vs folders. And there can only be
a few icons added. I have't found an MSDN page or source
code sample for the DLL. You'd need to work out the required
interfaces, write a DLL corresponding to the bitness of the
system, register it, then be ready to act when the system
calls you for a relevant icon scenario. And I suspect on
newer systems you might need to have your DLL signed.

I have an O'Reilly shell programming book from 2000 and
it has no mention of these extensions. Maybe MS never
intended for 3rd parties to use them. I don't know. In any
case, a lot of work for little gain.


  #22  
Old October 31st 20, 01:40 PM posted to microsoft.public.windowsxp.general,alt.windows7.general
Big Al[_5_]
external usenet poster
 
Posts: 1,588
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

On 10/31/20 6:47 AM, this is what Ed Cryer wrote:
Mayayana wrote:
"Ed Cryer" wrote

| Do you mean "an icon pointing to another icon"? And, if so, how does
| your mew .ovl extension fit into this schematic?
|
| As far as I can work out, you can't have an icon pointing to an icon.
| Windows isn't built for that.
|
| In this situation you'd be well advised to delineate what you're trying
| to do more explicitly.
|

Â* Find an EXE file. Right-drag it. Select Create Shortcut Here.
See how it's the same icon but now has a black/white
arrow in the corner? That's the shortcut icon, which can
be changed because it actually is an icon, overlayed on
top of the shortcut icon. In other words, Fireefox.exe
doesn't have a shortcut icon inside it. A shortcut is made
by using the Firefox icon and then adding the system icon
shortcut. (On my system, for example, I have a small
turquoise up arrow on shortcuts. I find the system version
looks garrish.)



That is quite brilliantly explained, man. You have a high talent for clear exposition.
Thank you.

Ed

Can you give us directions how you changed that arrow overlay? I like the idea. I'd probably put a yellow * instead but that's user pref.
Al

--
Linux Mint 19.3 64bit, Dell Inspiron 5570, Quad Core i7-8550U
  #23  
Old October 31st 20, 02:03 PM posted to microsoft.public.windowsxp.general,alt.windows7.general
Ed Cryer
external usenet poster
 
Posts: 2,621
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

Big Al wrote:
On 10/31/20 6:47 AM, this is what Ed Cryer wrote:
Mayayana wrote:
"Ed Cryer" wrote

| Do you mean "an icon pointing to another icon"? And, if so, how does
| your mew .ovl extension fit into this schematic?
|
| As far as I can work out, you can't have an icon pointing to an icon.
| Windows isn't built for that.
|
| In this situation you'd be well advised to delineate what you're
trying
| to do more explicitly.
|

Â* Find an EXE file. Right-drag it. Select Create Shortcut Here.
See how it's the same icon but now has a black/white
arrow in the corner? That's the shortcut icon, which can
be changed because it actually is an icon, overlayed on
top of the shortcut icon. In other words, Fireefox.exe
doesn't have a shortcut icon inside it. A shortcut is made
by using the Firefox icon and then adding the system icon
shortcut. (On my system, for example, I have a small
turquoise up arrow on shortcuts. I find the system version
looks garrish.)



That is quite brilliantly explained, man. You have a high talent for
clear exposition.
Thank you.

Ed

Can you give us directions how you changed that arrow overlay?Â* I like
the idea.Â* I'd probably put a yellow * instead but that's user pref.
Al


Windows is a hard-coded OS, which reads a file of system variables which
we call the "registry". We the users can tweak the variables, but not
the hard-coding.

I strongly suspect that the little arrow isn't a system variable. If it
were we'd find it tweakable in Ultimate Tweaker or Winaero Tweaker. It
is, of course, a variable as to whether it be on or off.

If anybody knows better, if they can find that little arrow in the
registry, then let us know; because then it would be tweakable with regedit.

Ed
  #24  
Old October 31st 20, 02:21 PM posted to microsoft.public.windowsxp.general,alt.windows7.general
Ed Cryer
external usenet poster
 
Posts: 2,621
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

Ed Cryer wrote:
Big Al wrote:
On 10/31/20 6:47 AM, this is what Ed Cryer wrote:
Mayayana wrote:
"Ed Cryer" wrote

| Do you mean "an icon pointing to another icon"? And, if so, how does
| your mew .ovl extension fit into this schematic?
|
| As far as I can work out, you can't have an icon pointing to an icon.
| Windows isn't built for that.
|
| In this situation you'd be well advised to delineate what you're
trying
| to do more explicitly.
|

Â* Find an EXE file. Right-drag it. Select Create Shortcut Here.
See how it's the same icon but now has a black/white
arrow in the corner? That's the shortcut icon, which can
be changed because it actually is an icon, overlayed on
top of the shortcut icon. In other words, Fireefox.exe
doesn't have a shortcut icon inside it. A shortcut is made
by using the Firefox icon and then adding the system icon
shortcut. (On my system, for example, I have a small
turquoise up arrow on shortcuts. I find the system version
looks garrish.)



That is quite brilliantly explained, man. You have a high talent for
clear exposition.
Thank you.

Ed

Can you give us directions how you changed that arrow overlay?Â* I like
the idea.Â* I'd probably put a yellow * instead but that's user pref.
Al


Windows is a hard-coded OS, which reads a file of system variables which
we call the "registry". We the users can tweak the variables, but not
the hard-coding.

I strongly suspect that the little arrow isn't a system variable. If it
were we'd find it tweakable in Ultimate Tweaker or Winaero Tweaker. It
is, of course, a variable as to whether it be on or off.

If anybody knows better, if they can find that little arrow in the
registry, then let us know; because then it would be tweakable with
regedit.

Ed


Or even in one of the link libraries, where it could be changed or replaced.

Ed
  #25  
Old October 31st 20, 02:27 PM posted to microsoft.public.windowsxp.general,alt.windows7.general
Mayayana
external usenet poster
 
Posts: 6,438
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

"Big Al" wrote

| Can you give us directions how you changed that arrow overlay? I like the
idea. I'd probably put a yellow * instead but that's user pref.
|

Was that intended for me? See below.

The easy way, designed for XP but not tested on Win7:

https://www.jsware.net/jsware/xpfix.php5#xpico

To do it by hand....

Registry key:

Software\Microsoft\Windows\CurrentVersion\explorer \Shell Icons\

Create values if they don't exist: "29" and "30"
(Removing the values will cause the default to return.)

Data for those values should be like so:

C:\NewIconsFolder\shortcut.ico,0

The 0 indicates the first icon in the file or library. An ICO file
can contain multiple icons.

The Refresh button in the icon changer program uses a common
method to make the new setting show. Windows has been
inconsistent over the years with how/if it updates settings.
They should take with a reboot. What the Refresh button does
is to change the icon size in HKCU\Control Panel\Desktop\WindowMetrics\
by 1 pixel. It then calls SendMessageTimeout to send a broadcast
message to the system that a setting has been changed. Then it
changes the setting back and makes the same call again. It's
like what happens when you close a settings window for similar
settings. You see the desktop/Explorer refresh the display. The
Refresh button can also be used to force Windows to repair
faulty display.

CAVEAT: On XP, at least, such a refresh will cause desktop icons
to line up on the left. There's a warning in the program. Microsoft
like to break things when anyone tries to customize. I use
Icon Restore to save the desktop layout and restore it. I don't
know if there's a Win7 equivalent.

What you might be able to do on Win7 is to change something else,
like the disk icon, then change it back, in order to make Windows
update the display.

I've used a 32x32 16-bit icon for the shortcut arrow. You might
need to play around if your icons are not showing at 32x32. There's
also a script-based icon extractor he

https://www.jsware.net/jsware/scrfiles.php5#iconextr

It will extract icons from any PE file. It's perfectly safe
to use. There are VBS scripts that read the PE file bytes
directly, parsing the header to find the resource section
and then find any icons stored there. The icons are stored
as icon images and mask images. The script copies the bytes
for each icon, creates an ICO file header accordingly, puts
those together, and writes it to disk. There's no writing or editing
to the PE file. Any EXE, DLL, etc can have icons. The system icons
are in a few places, with many in shell32.dll.

Both downloads include explanatory readme files.


  #26  
Old October 31st 20, 02:40 PM posted to alt.windows7.general,microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

Ed,

Ah, light dawns.
Well, you can certainly remove the little arrow, and even put it
back again,


Changing the existing shortcut and/or its overlay icon was and/or is not
what I'm after.

But to go further you'd have to tinker with Windows core,
and that would create more problems than benefits.


I've made a few changes to (the supporting files to) the OS myself. Just to
see if I could. Can't remember that it ever went bad.

Any future change, any update, would be in danger of
failing, and, at best, would simply wipe out your change.


:-) You seem to be suggesting to do absolutily nothing so that failure is
impossible and make nothing so it cannot become obsolete either. Are you
? I hope not.

Do some lateral thinking. Backtrack on your problem and look
for other avenues of approach.


While I'm open to other avenues (if you have them do not hesitate to mention
them), I tend to do a thorough search of the direction I've chosen*.
Nothing is as infuriating as throwing your hands up in defeat, only to be
shown that the exit of the dungeon was just another left from where you
started to walk back. :-)

*funnily enough that often turns up possible other avenues that I was not
aware of.

Regards,
Rudy Wieser


  #27  
Old October 31st 20, 02:50 PM posted to microsoft.public.windowsxp.general,alt.windows7.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

Mayayana,

But I had one registered on my XP box -- Client Side Caching
UI - cscui.dll.


JJ mentioned the registry key where those extensions are "kept", and from
there I found the same DLL. I've been pulling it thru a disassembler to see
if I could spot some easy knowledge, but its going to take a while longer.

In any case, a lot of work for little gain.


Yep, that was what my "Not sure if its worth the trouble" was about (I
already found some stuff talking about it in a rather global way).

But it looks like I simply could not help myself, and already set the first
steps. :-) Not sure if I will be able to successfully write one though.
As you said, pertinent information about it is hard to find. -|

Regards,
Rudy Wieser


  #28  
Old October 31st 20, 03:28 PM posted to microsoft.public.windowsxp.general,alt.windows7.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

Al,

Can you give us directions how you changed that arrow overlay? I like the
idea. I'd probably put a yellow * instead but that's user pref.


You aimed you message at the wrong person. Mayayana did the explanation.


It works the same way for both XP and Win7. See "option two" and Nosmo's
post at the end he

https://www.sevenforums.com/tutorial...e-restore.html

If the "Shell icons" key does not exist, create it as well as the "29"
string-value. You use any icon you like. In shell32.dll or another DLL or
executable or even a stand-alone icon.

Regards,
Rudy Wieser


  #29  
Old October 31st 20, 05:31 PM posted to microsoft.public.windowsxp.general,alt.windows7.general
Mayayana
external usenet poster
 
Posts: 6,438
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

"R.Wieser" wrote


|
| If the "Shell icons" key does not exist, create it as well as the "29"
| string-value.

That should work, but in the past there have been two shortcut
icons. That's why I also set 30. It may be extinct now, but it doesn't
hurt to do both.


  #30  
Old October 31st 20, 06:55 PM posted to microsoft.public.windowsxp.general,alt.windows7.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Changing a filetypes icon - adding a"shortcut" like mini-icon

Mayayana,

| If the "Shell icons" key does not exist, create it as well as the
| "29" string-value.

That should work, but in the past there have been two shortcut
icons. That's why I also set 30. It may be extinct now, but it
doesn't hurt to do both.


To be honest, I took my cue from the website I posted the link to. I
tested the "29" entry on XP and saw the change on a shortcut-to-file. Can
you tell me what the "30" entry icon is intended for ? Folders perhaps ?

Regards,
Rudy Wieser


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 11:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.