我正在尝试使用程序的自定义图标更改文件夹窗口的图标。我知道我可以通过右键单击文件夹并使用属性来更改图标,但是我需要图标在我制作的部分软件中永久不同。这是一个NWJS应用程序。
编辑我所做的工作:
desktop.ini
[.ShellClassInfo]
ConfirmFileOp=0
NoSharing=0
IconFile=Folder.ico
IconIndex=1
InfoTip=Secure Drive
路径:“ d:\ secure drive”
我使用 attrib +s“ Secure Drive”
使用 CD'到D:\
之后。我已经重新启动和刷新了文件夹,图标仍未更改。该图标是我使用32位以所有可用尺寸的在线转换器转换的ICO。该图标命名为 folder.ico
,位于与 desktop.ini
的同一DIR中。
I'm trying to change the icon of a folder windows with a custom icon for my program. I know I can by right clicking folder and using properties to change the icon, but I need the icon to be permanently different for part of my software I'm making. This is a NWJS app.
EDIT of what I've done:
desktop.ini
[.ShellClassInfo]
ConfirmFileOp=0
NoSharing=0
IconFile=Folder.ico
IconIndex=1
InfoTip=Secure Drive
Path: "D:\SECURE DRIVE"
I used attrib +s "SECURE DRIVE"
after using CD'ing to D:\
. I've restarted and refreshed folders and the icon is still not changing. The icon is an ICO I converted using an online converter in 32bit with all available sizes. The icon is named Folder.ico
located in the same DIR as the desktop.ini
.
发布评论
评论(2)
这是通过创建
desktop.ini
文件来完成的。请参阅此处的MSDN文档: https://learn.microsoft.com/en-us/windows/win32/shell/how-to-customize-folders-folders-folders-with-desktop-ini“
从上面的链接:
This is done through creating a
Desktop.ini
file. See here for MSDN Documentation: https://learn.microsoft.com/en-us/windows/win32/shell/how-to-customize-folders-with-desktop-iniEDIT1:
To quote from the link above:
iconIndex = 1
必须是iconindex = 0
。IconIndex=1
must beIconIndex=0
for .ico files.