We are trying to disribute Pen Drives for a certain cause and we have some folders for which we want to display our own custom icons.
The .ico files are present on the pen-drive itself. We are trying the old-school method for changing the icons i.e. Properties > Customize > Change Icon
However, the problem is that on different systems, the drive-letter changes and so does the path. Due to this, the icons don't get displayed as we intend them to do.
Please suggest a way to set the path of the icons in such a way that they can be displayed on all systems regardless of the drive-letter of the usb-drive.
Make a new shortcut to: cmd.exe /c start. Now right-click on it and get properties of the shortcut (shortcut tab). The full shortcut path should have been set to this: %windir%\system32\cmd.exe /c start .
Relative paths make use of two special symbols, a dot (.) and a double-dot (..), which translate into the current directory and the parent directory. Double dots are used for moving up in the hierarchy. A single dot represents the current directory itself.
Click the Start button and then click Computer, click to open the location of the desired file, hold down the Shift key and right-click the file. Copy As Path: Click this option to paste the full file path into a document. Properties: Click this option to immediately view the full file path (location).
Place a file called desktop.ini
inside each folder and fill it with this content:
[.ShellClassInfo]
IconResource=..\Icons\my_resourceDLL.dll,XXX
Or:
IconResource=..\Icons\icon.ico,0
Where XXX
is the icon number. ..\Icons
is a relative path, you can use your own dir name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With