Solved: Batch Icons???

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Psycoblast

Thread Starter
Joined
Aug 1, 2009
Messages
45
Hey Everyone

I was making a file for my friends usb, he opens it it scans every drive for a file on his drive when it finds it it creates directorys and folder locks and stuff to deck it out I was wondering if you can set folder icons through a batch file (Pretending that the icon you want to use, already exists on usb).




Thanks Psycoblast
-Psycoblast

P.S. Check out my "Batch Browsing Window???" Fourm
 

Squashman

Retired Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
Create a desktop.ini file inside the folder.
Edit the desktop.ini file and add these lines to it.
Code:
[.ShellClassInfo]
IconFile=CustomFolderIcon.ico
IconIndex=0
Save your CustomFolderIcon.ico inside the folder.

In your batch file run the attrib command to make the folder a system folder.

attrib +s foldername
 

Psycoblast

Thread Starter
Joined
Aug 1, 2009
Messages
45
Awesome Thanks for quick answer.

Ok I've made a random file on desktop called zzzz and I opened a notepad and typed this into it:

[.ShellClassInfo]
IconFile=Nuke.ico
IconIndex=0

And this did not do anything I opened Command Prompt and typed in Cd desktop\zzzz then typed
attrib +s %cd% and then I refreshed the desktop more than once and nothing happened what did i do wrong???

Then I deleted the desktop.ini and tried making an icon through the normal way (Properties-Customize) and viewed the desktop.ini file with Command Prompt by typing type desktop\zzzz\desktop.ini >>DesktopView.txt
Then I looked at it and it said this:

[.ShellClassInfo]
IconResource=C:\Users\Psycoblast\Desktop\zzzz\nuke.ico,0
[ViewState]
Mode=
Vid=
FolderType=NotSpecified

So thats the problem also a quick quesion?


What if the icons in a different destination?

Do I go:

[.ShellClassInfo]
IconFile="C:\Program Files\Icons\IconName.ico"
IconIndex=0

Or do I use previous example of computer generated desktop.ini code???

Thanks for the answer
 

Squashman

Retired Trusted Advisor
Joined
Apr 4, 2003
Messages
19,786
Never told you to do this.
attrib +S %cd%
For all I know you were not in the correct directory when you ran that command. I would hard code the path backup one directory and run the attrib command while you are not in the directory.

I told you to run the attrib command on the folder you created.

I have not tested this on Vista so I can't say for sure if this is a Vista Issue or not. It works just fine on XP. You are the "Advanced Bath" guru so I would assume you probably have more experience at this then me.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top