Wrox Programmer Forums
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 18th, 2005, 08:51 AM
Registered User
Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #2 (permalink)  
Old January 23rd, 2005, 12:19 PM
Authorized User
Join Date: Jan 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts

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.
Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can we change the icon of exe file in c++? shiva777 C++ Programming 1 May 13th, 2008 07:00 AM
how to change icon of exe file aashish23 C# 1 September 25th, 2007 08:21 AM
How to add icon file for a web application?? noblez ASP.NET 1.0 and 1.1 Professional 3 April 24th, 2007 02:21 AM
how do i change the site icon on a geocitiies site uprocker2 HTML Code Clinic 2 March 4th, 2005 07:20 AM
How can i change the icon of the IE? vincentc Classic ASP Basics 0 September 7th, 2003 09:23 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.