p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   VBScript (http://p2p.wrox.com/forumdisplay.php?f=77)
-   -   Change File Icon (http://p2p.wrox.com/showthread.php?t=24042)

red4vbs January 18th, 2005 08:51 AM

Change File Icon
I know how to change the Icon of the shortCut. I would like the logic behind how you change the Icon of a file. say if I wanted to make my .vbs file icon a big red "V".

Thanks alot,

Randy Dray

Dreamvb January 23rd, 2005 12:19 PM

You can't chnage the icon of your own .vbs script with out chnageing evey other .vbs script icon. the reason been be cause that script is assigned a icon from the vbscript Interpreter.

and if you want to know the logic of how the .vbs gets it icon look under the Registry HKEY_CLASSES_ROOT\VBSFile\DefaultIcon
you see it has a value of %SystemRoot%\System32\WScript.exe,2
WScript.exe is the Interpreter and the 2 is the icon index the .vbs file is using.

ok on the other hand if you want to have your own icon for a .vbs file and if you know how to use Visual Basic 6 I suguest haveing a look at some code I made it does what you require.

Well it allows you to assign your own custom icon to a .vbs file. I made it bcause of a scripting lanuage I was makeing here the link

Add Icons to your scripts.

Other than that I can;t think of any other way to chnage a .vbs icon. hope that helps.

When ya dreams come true.

All times are GMT -4. The time now is 02:08 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.