How to change the icon of a file association in command line

H

Heelen Diyond

I know the command to change the file association is "assoc",but how can i
change the icon?
 
M

Mark V

In said:
I know the command to change the file association is "assoc",but
how can i change the icon?

Perhaps,
D:\temp3>assoc .log
..log=txtfile

reg.exe add "HKCR\txtfile\defaulticon" /ve /d "c:\somewhere\Mynpad.ico" /f

Icon resource may be an icon file or and executable (.exe, .dll)
with a index number as in
C:\winnt\notepad.exe,0

REG.EXE is either installed or can be installed with the "Support
Tools". (for W2K/XP/2K3)


There may be other CLI methods to do this.
 
H

Heelen Diyond

Thanks a million,though I had known this method
But,are there any other better ideas?
 
M

Mark V

In said:
Thanks a million,though I had known this method
But,are there any other better ideas?

Great. I hope to read some of them!

Have you also ruled out generating a REG file and importing from the
CLI then?

What (generally) are you looking for? VBS script? Command-line tool
such as the hypothetical:
SetIco.exe ext icopath

Cheers
 
H

Heelen Diyond

Hi,Mark.Yes,i'm looking for a command-line tool.It seems that there's no
such tool in windows.


--
Regards,
Heelen Diyond...
If you can't understand my poor English clearly,please reply,and I'll do my
best to explain and help u
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top