# README
icon-detect
Icon-detect detects the order of the icon-overlay of Windows, and performs auto-adjustment.
Background
Windows supports icon-overlay for files and folders. But Windows also has a limited number for icon-overlay, so the order of icon-overlay is important. It's called 'icon-overlay battle'.
Find more in List of shell icon overlay identifiers from Wikipedia. It also lists the icon of popular software.
Usage
-
(FIXME) Modify source code.:
-
Change
BOOST
list inpkg/detect/detect.go
to the software you want to adjust. -
Change
PROGRAMTOKILL
in main.go to the application you want to restart, after the icon-overlay adjustment.
-
-
Build the binary.
PS > go build .
OR (to hide cmd windows):
PS > go build -ldflags -H=windowsgui .
⚠️
-H=windowsgui
will also silence the stdout and stderr. e.g,-h
and-v
will not have any output. -
Run it
-
⚠️icon-detect need to be run as administrator, as it need to access the registry. See UAC for more information.
-
icon-detect will output log file (with rotation) under the execute directory.
-
-b
to backup the registry before auto-adjustment.
-
-
(Optional) Restarting Application via Windows URI Scheme.
-
icon-detect needs to be registered as a protocol handler.
PS > .\icon-detect.exe -r
⚠️run as administrator.
-
once registered, icon-detect can pop notification to restart application.
-
Unregister the protocol handler, if needed.
PS > .\icon-detect.exe -u
⚠️run as administrator.
-
UAC
Windows has a UAC(User Account Control) mechanism. You can build icon-detect try to detect if UAC is enabled, and if it is, it will prompt a UAC dialog to ask for administrator permission.
PS > \path\to\mt.exe -manifest app.manifest -outputresource:icon-detect.exe;1