Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c4b0cde1d6 |
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -34,20 +34,7 @@ namespace DesktopNotifications.Windows
|
||||
|
||||
SetCurrentProcessExplicitAppUserModelID(aumid);
|
||||
|
||||
using var shortcut = new ShellLink
|
||||
{
|
||||
TargetPath = mainModule.FileName,
|
||||
Arguments = string.Empty,
|
||||
AppUserModelID = aumid
|
||||
};
|
||||
|
||||
var appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
var startMenuPath = Path.Combine(appData, @"Microsoft\Windows\Start Menu\Programs");
|
||||
var shortcutFile = Path.Combine(startMenuPath, $"{appName}.lnk");
|
||||
|
||||
shortcut.Save(shortcutFile);
|
||||
|
||||
return new WindowsApplicationContext(appName, aumid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user