Jump to content
Can't remember your login details? Read more... ×
UserInterface

Changing icon with bat/cmd

Recommended Posts

Anyone know if I can change the icon on shortcuts/folders with a bat file or something similar?

 

I have an icon set that I always use, but I am getting sick of setting them one at a time.

Share this post


Link to post
Share on other sites

 

http://tinyurl.com/ykpzz6k

 

I am asking if there is a way to change the icon associated with a shortcut/folder/exe etc, not create a shortcut.

but thanks for jumping in and being a smart arse, maybe two lines of text was more then you are able to read without a break.

 

I have googled to see if I can find the answer, that does not mean that it is not there, just that I have not found the right search term.

 

I basically want to right click a icon, select properties, then select change icon and change the icon to one that I want. But I want this done through a bat file or similar.

There appears to be a way to do this through registry, but it is too complicated to try to work out what icon is what number.

 

BTW forgot to say before that I am using Windows 7 RTM.

Share this post


Link to post
Share on other sites

because this is a shortcut it can not be done through the registry. The icon reference for a shortcut is in the "shortcut" binary file.

 

If you want to automate a series of windows actions in a scripted way, AutoIT can simulate mouse clicks and keystrokes

 

also you can use the "create a shortcut" instructions as a stepping stone to what you want to do

 

read existing shortcut + delete existing shortcut + create new shortcut = same as edit shortcut

 

sorry for giving you enough credit to join the dots

Share this post


Link to post
Share on other sites

because this is a shortcut it can not be done through the registry. The icon reference for a shortcut is in the "shortcut" binary file.

 

If you want to automate a series of windows actions in a scripted way, AutoIT can simulate mouse clicks and keystrokes

 

also you can use the "create a shortcut" instructions as a stepping stone to what you want to do

 

read existing shortcut + delete existing shortcut + create new shortcut = same as edit shortcut

 

sorry for giving you enough credit to join the dots

There are no dots to join, you are still not providing me with a way to do what I have asked.

I wish to modify the icon on already created shortcuts, I can see no way of doing this through a cmd prompt, hence why I posted the question.

 

You could have just answered "No. there is no way to do this through a BAT. however have you thought about trying to do it through registry?"

 

That would have been easier if you knew the answer, if you were not sure then don't respond.

 

If you thought I was being lazy then say so, and I would have made my post a lot longer and put examples of what I was putting in the "Google Box".

I always look for my answers first, and generally only end up posting when I do not know the correct terminology, so can not find what I am looking for.

 

Then again, sometimes I make a post to see if I can find a better way to do something.

 

Just don't see the need for your attitude on a simple post, next time don't be an asshole just skip my posts if you don't agree.

Share this post


Link to post
Share on other sites
Prepare to get your arse kicked because he wants "to change the icon associated with a shortcut/folder/exe etc, not create a shortcut"

and we all know that you can't replace an existing file with a new file that exactly matches it, with the exception of the property that you want changed. That is not editing, that is deleting and creating. Completely different thing! Silly.

Share this post


Link to post
Share on other sites
Prepare to get your arse kicked because he wants "to change the icon associated with a shortcut/folder/exe etc, not create a shortcut"

and we all know that you can't replace an existing file with a new file that exactly matches it, with the exception of the property that you want changed. That is not editing, that is deleting and creating. Completely different thing! Silly.

 

I you have security set on your desktop as I do then this is correct I can not recreate my icons only edit them, I could change the permissions but I would prefer a way to do what I want with out creating other issues

 

This looks exactly like what I was after although I have to run the VBS through a Bat (no biggy), I will try to give it a go during next week and post back here.

Thanks for the link!

Share this post


Link to post
Share on other sites

This looks exactly like what I was after although I have to run the VBS through a Bat (no biggy), I will try to give it a go during next week and post back here.

Thanks for the link!

 

You're welcome :)

 

Hopefully the script can be finessed to suit your purposes...

 

Thanks this turned out perfect.

Thanks Kensay

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×