overwrite icon when creating shortcut

This commit is contained in:
Lightczx
2023-09-11 09:05:03 +08:00
parent 91d90cb3fa
commit 52353b7a5a

View File

@@ -19,7 +19,7 @@ internal sealed partial class ShellLinkInterop : IShellLinkInterop
{
string sourceLogoPath = Path.Combine(runtimeOptions.InstalledLocation, "Assets/Logo.ico");
string targetLogoPath = Path.Combine(runtimeOptions.DataFolder, "ShellLinkLogo.ico");
File.Copy(sourceLogoPath, targetLogoPath);
File.Copy(sourceLogoPath, targetLogoPath, true);
IShellLinkW shellLink = (IShellLinkW)new ShellLink();
shellLink.SetPath("powershell");