1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Batch Icons???

Discussion in 'Windows Vista' started by Psycoblast, Apr 6, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. Psycoblast

    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
     
  2. Squashman

    Squashman 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
     
  3. Psycoblast

    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
     
  4. Squashman

    Squashman 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.
     
  5. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
  6. Psycoblast

    Psycoblast Thread Starter

    Joined:
    Aug 1, 2009
    Messages:
    45
    Ok Thanks for all your help!!! I must of messed up it works now.
     
  7. Sponsor

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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/915220

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice