chtof / chocolatey-packages

Apache License 2.0
12 stars 37 forks source link

source-han-code-jp: Fix installation and uninstallation problems #91

Closed cariandrum22 closed 1 year ago

cariandrum22 commented 1 year ago

Since Windows 10 build 1809, the shell variable 0x14 has been being overloaded and redirected to the user's profile.

Thereby will place the file copied by Shell.Application.Namespace(0x14).CopyHere() into C:\Users\<username>\AppData\Local\Microsoft\Windows\Fonts.

The uninstall script was processing $([Environment]::GetFolderPath('Fonts')), so there was a difference between the install directory and the uninstall directory.

To quickly solve this problem, the font-helper extension was added as a dependency, and the extension's function replaced adding and removing fonts.