現在、プログラムでショートカットを作成していますが、C# で同様の方法でグローバル ショートカットを作成できるかどうかを知りたいです。
以下は私のコードです:
WshShell shell = new WshShell();
string shortcutLocation = "pathToShortcut//Shortcut1.lnk"
IWshShortcut shortcut = shell.CreateShortcut(shortcutLocation);
shortcut.Arguments = "foo bar";
shortcut.Description = "Test Shortcut";
shortcut.TargetPath = "pathToShortcutExe";
shortcut.WorkingDirectory = "pathToWorkingDirectory"
shortcut.Save();
このコードは、ユーザーのショートカットを作成するのに最適ですが、システムでこれを行う方法があるかどうかを知りたいです。グローバルにインストールされたプログラムがすべてのユーザーにショートカットを配置するのを見たので、C# でこの効果を実現する方法に興味があります。