dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
4870
share rss forum feed


Scilicet
Spaced Out
Premium
join:2005-04-11
Aurora, CO
kudos:1
Reviews:
·Vonage

[WIN7] Can you change the icon on individual .cmd files?

A friend asked me to set up some individual desktop files to open specific webpages in a browser. She wanted 6 different icons for 6 different webpages. So I set up 6 different .cmd files on her desktop as so:

start firefox.exe http...webpage

I don't think it is possible in Win7, but does anyone know if can I assign a different icon to each of the 6 .cmd files on her desktop? I suppose that I could write a few java programs to open the browser or maybe some html files with specific icons specified, but it's way too much trouble. Is there a simple solution? Thanks for any input.
--
Today's scientists have substituted mathematics for experiments, and they wander off through equation after equation, and eventually build a structure which has no relation to reality. ~ Nikola Tesla



Hall
Premium,MVM
join:2000-04-28
Germantown, OH
kudos:2

What about locating the various .cmd files in a directory somewhere and then make shortcuts on the desktop to these ? I think you can change icons on shortcuts...


dave
Premium,MVM
join:2000-05-04
not in ohio
kudos:8
Reviews:
·Verizon FiOS
reply to Scilicet

I don't know, but is there some reason why you're using a .cmd file rather than just a simple shortcut to the web page?

Easy approach: open the web page in the browser, then drag the icon from the address bar to the desktop. Change icon as required.

This will open the web page in the default browser, which may or may not be what you need.



Freddy
Premium
join:2005-05-17
Arlington, VA
kudos:2
reply to Scilicet

Also, one of these shortcuts methods may work:

»support.microsoft.com/kb/140443

Just put the address to the website in the shortcut, as specified. You can find icons in Windows or on the Internet. Just Google for icons.

Freddy



Scilicet
Spaced Out
Premium
join:2005-04-11
Aurora, CO
kudos:1
Reviews:
·Vonage
reply to dave

Changing the icon to one .cmd file changes it for all .cmd files. Apparently, Win7 wants to insure that a hacker can't replace a desktop program to a cmd file with a false icon. Nice idea.

Dragging the icon from the address bar will save that webpage as a html file to something like C:\\..... to where ever you specify on your HD. Tried that.

No she wants to open only one active page address to, say, her bank and another to her email, etc. I have set her default home pages separated by | so that all her webpages open in separate tabs in the browser. She also wants separate desktop files to open each webpage individually. The cmd file works well that way, but the system will supply the cmd file icon shown with gears to all files with a .cmd extension.

I just thought that someone here might have found a simple solution without hacking the system or writing programs.
--
Today's scientists have substituted mathematics for experiments, and they wander off through equation after equation, and eventually build a structure which has no relation to reality. ~ Nikola Tesla



Scilicet
Spaced Out
Premium
join:2005-04-11
Aurora, CO
kudos:1
reply to Freddy

Thanks Freddy, but those methods work for program files and not .cmd files.



Kramer
Premium,Mod
join:2000-08-03
Richmond, VA
kudos:2
reply to Scilicet

Not sure I understand your problem. What you describe is not rocket science and is done thousands of times a day. As Dave said most people do what you want to do by creating shortcuts. If dragging the URL to the desktop doesn't work for you, simply right click a blank spot on the desktop and left click "new" and then shortcut. Either manually enter or paste the web site address into the location field. Assign an icon and that icon is unique to that shortcut. That's probably the most common method for doing what you want.

You have added one twist. You are insisting Firefox open up the web site, and if Firefox isn't your default browser, then the shortcut to a URL will not work quite the way you want. In that case, your method is fine, but don't place the command files on the desktop, place shortcuts to those command files instead. The icons for those are totally adjustable and you can use anything you want.

In the attached graphic, I have two shortcuts to CMD files and one URL shortcut which normally would be the icon for my default browser (Chrome), but was easily changed.

LLigetfa

join:2006-05-15
Fort Frances, ON
kudos:1
reply to Scilicet

I still don't understand why CMD files would be needed. Shortcuts work fine and there is no need to make a shortcut to a CMD file either.

If and when I need to use a CMD file, I create a LNK to it so that I can start it minimized and not get that ugly black window flash up.
--
Strange as it seems, no amount of learning can cure stupidity, and formal education positively fortifies it. -- Stephen Vizinczey



workablob

join:2004-06-09
Houston, TX
kudos:3
Reviews:
·Comcast
reply to Scilicet

said by Scilicet:

A friend asked me to set up some individual desktop files to open specific webpages in a browser. She wanted 6 different icons for 6 different webpages. So I set up 6 different .cmd files on her desktop as so:

start firefox.exe http...webpage

I don't think it is possible in Win7, but does anyone know if can I assign a different icon to each of the 6 .cmd files on her desktop? I suppose that I could write a few java programs to open the browser or maybe some html files with specific icons specified, but it's way too much trouble. Is there a simple solution? Thanks for any input.

Login as administrator
Paste this code into a text file.
Rename from .txt to .vbs
Place in System32 or somewhere else if you like.
Copy file
Paste shortcut on desktop
Right-Click and select properties.
Click Change Icon

'BEGIN CODE
Option Explicit

Dim wshShell
Set wshShell = CreateObject ("wscript.shell")

wshShell.CurrentDirectory = "c:\program files\internet explorer"

wshShell.Run "iexplore.exe mysite.com", 1, vbFalse

Set wshShell = nothing

'END CODE
--
I may have been born yesterday. But it wasn't at night.


Scilicet
Spaced Out
Premium
join:2005-04-11
Aurora, CO
kudos:1
reply to Kramer

Yes, that works. Thanks Kramer. No, it's not rocket science, but can be a bit confusing if you've never had a need for it before.


OZO
Premium
join:2003-01-17
kudos:2

1 recommendation

reply to LLigetfa

said by LLigetfa:

I still don't understand why CMD files would be needed. Shortcuts work fine and there is no need to make a shortcut to a CMD file either.

If and when I need to use a CMD file, I create a LNK to it so that I can start it minimized and not get that ugly black window flash up.

There could be many, many different reasons, why one wants to do that. Here is just one example. If I want to run browser with dynamic profile (to guarantee my privacy protection) I may want to create (copy) profile in temporary place, launch the browser, pointing to that profile, use it as needed, close the browser and then BAT file will remove that temporary profile folder. Here you can find example of BAT file, doing exactly that. And BTW, you can easily hide that "ugly black window flash up" if you want too. Linked page mentions utility (CMDH), that will help you to do that
--
Keep it simple, it'll become complex by itself...

dave
Premium,MVM
join:2000-05-04
not in ohio
kudos:8
Reviews:
·Verizon FiOS

1 edit
reply to Scilicet

said by Scilicet:

Apparently, Win7 wants to insure that a hacker can't replace a desktop program to a cmd file with a false icon. Nice idea.

I don't think so. I think it's just that there is no place to store the icon except in cmd.exe. If you change the icon for an .exe file, for a shortcut, etc., the icon is stored in that file. A cmd file is plain text. Where's the icon going to go?

And in fact if I put a .cmd file on the desktop, there's no place to even attempt to change the icon for it (right-click, properties yields no such option). Whereas if I make a shortcut to that same .cmd file, the icon can be changed on the 'shortcut' tab of the property sheet. So I wonder how you're attempting to change the icon?

Dragging the icon from the address bar will save that webpage as a html file to something like C:\\..... to where ever you specify on your HD. Tried that.

Works for me, I've been using it for practically ever. And if I look at the 'properties' of the shortcut, the URL field has precisely the URL of the actual web page.

I just thought that someone here might have found a simple solution without hacking the system or writing programs.

Really, the drag icon-to-desktop is that simple solution on all the Win7 systems I use. We must be using different methodologies, but I can't see how.


Freddy
Premium
join:2005-05-17
Arlington, VA
kudos:2
reply to Scilicet

Thanks Freddy, but those methods work for program files and not .cmd files.

What I referenced to is the same thing as what Kramer told you regarding using a shortcut to a web page. Easy.

Freddy



Scilicet
Spaced Out
Premium
join:2005-04-11
Aurora, CO
kudos:1

Yes, and I thank you both for the help. It was easy once the proper procedure was described and that was exactly what I was looking for. Thanks again.


OZO
Premium
join:2003-01-17
kudos:2
reply to dave

said by dave:

said by Scilicet:

Apparently, Win7 wants to insure that a hacker can't replace a desktop program to a cmd file with a false icon. Nice idea.

I don't think so. I think it's just that there is no place to store the icon except in cmd.exe. If you change the icon for an .exe file, for a shortcut, etc., the icon is stored in that file. A cmd file is plain text. Where's the icon going to go?

It all depends on developer's willingness to support the feature. If they wanted to implement it, they know, that there is the easy way. They could add ADS to .cmd/.bat files as they do it for e.g. .url files. Example of such ADS: :favicon:$DATA 1078. But they've decided, that we don't need it. Instead they think that we need aero and transparency more, than that basic functionality... :( If I were working on that functionality, I'd implement it the same way as for other type of files. But who cares there, what we customer need or ask for...

--
Keep it simple, it'll become complex by itself...

dave
Premium,MVM
join:2000-05-04
not in ohio
kudos:8
Reviews:
·Verizon FiOS

Sure, it's software, any anything can be done. But I was talking about how things actually are, not how they could be if they were different.

(Though thanks for the info that .url files store it in a named stream; I thought it was actually in the unnamed stream)

I suggest that rather than having "decided you don't need it", it's more likely that hardly anyone's actually asked for it.

Anyway, there's a trivial workaround: use a shortcut to the batch file; put the batch file not-on-your-desktop and the shortcut on your desktop. Problem solved.