desktop.ini

How to create desktop.ini in PowerShell?

情到浓时终转凉″ 提交于 2019-12-25 07:50:07
问题 My goal is to customize all folder icon if the foder's name end by "_S" So i writed a PowerShell function but the customize doesn't work. I took inspiration from: Website to set attribute on desktop.ini Function that sets a custom folder icon function Set-icon_Folder_S($path) { $ini = '[.ShellClassInfo] IconIndex = 0 IconResource=C:\private.ico,0 ConfirmFileOp = 0 DefaultDropEffect = 1' Set-Location $path #List all folder end with _S $items = Get-ChildItem -Recurse | Where-Object {($_

How can I immediately reload a folder icon when desktop.ini is changed

て烟熏妆下的殇ゞ 提交于 2019-12-19 17:45:51
问题 I'm trying to change folder icon programmatically using changing desktop.ini on the folder. I can set a icon, but can't change it immediately through changing "IconIndex". The icon is also changed in several seconds later. Is there anybody know how to change the icon immediately? 回答1: I already answered by commenting a reply at my question before. For more convenience, I will write an answer again. If you want to make any change at an appearance of any folder using Desktop.ini, use some of

desktop.ini for root of the drive

孤街浪徒 提交于 2019-12-12 00:47:53
问题 In Windows, you can bind a Shell Namespace Extension to a folder by setting a System or Readonly attribute and placing a desktop.ini with appropriate CLSID inside. However, I can't see a way to set a system attribute to the root of the drive . Does this mean that I can't do it, or am I missing something obvious? 来源: https://stackoverflow.com/questions/11329846/desktop-ini-for-root-of-the-drive

How to Get/Set Folder Type in C#

本小妞迷上赌 提交于 2019-12-07 18:43:51
问题 Windows defines five folder types (general items, documents, pictures, music, and video). In Windows Explorer you can get/set the type by right-clicking on the folder and selecting Properties->Customize->Optimize this folder for. I'm looking for a way to get/set folder type in C#. I've searched for this, but I must not be using the correct terminology. Can someone point me in the right direction? Update : Thanks to all for the insights! Thought this would be simple - apparently NOT. Very odd.

How to Get/Set Folder Type in C#

我是研究僧i 提交于 2019-12-06 06:13:56
Windows defines five folder types (general items, documents, pictures, music, and video). In Windows Explorer you can get/set the type by right-clicking on the folder and selecting Properties->Customize->Optimize this folder for. I'm looking for a way to get/set folder type in C#. I've searched for this, but I must not be using the correct terminology. Can someone point me in the right direction? Update : Thanks to all for the insights! Thought this would be simple - apparently NOT. Very odd. I can select a folder with no desktop.ini. I can change the properties of that folder, select a folder

How can I immediately reload a folder icon when desktop.ini is changed

為{幸葍}努か 提交于 2019-12-01 16:42:46
I'm trying to change folder icon programmatically using changing desktop.ini on the folder. I can set a icon, but can't change it immediately through changing "IconIndex". The icon is also changed in several seconds later. Is there anybody know how to change the icon immediately? I already answered by commenting a reply at my question before. For more convenience, I will write an answer again. If you want to make any change at an appearance of any folder using Desktop.ini, use some of win32 shell functions. You shouldn't try to edit a Desktop.ini directly. It doesn't get to make any change at