我正在为我的应用程序编写安装程序,并且在安装过程中会创建一些开始菜单快捷方式。但是,除非我以管理员身份安装(这不是必需的),否则尽管安装了所有快捷方式,但某些快捷方式在安装后仍不会出现在“开始”菜单中。这是我编写供参考的代码:
IWshRuntimeLibrary.WshShell shell = new IWshRuntimeLibrary.WshShell();
IWshRuntimeLibrary.IWshShortcut help_shortcut = shell.CreateShortcut(shortcut_path + "\\KShootMania Skin Manager\\Help.lnk");
help_shortcut.TargetPath = startup_shortcut.TargetPath;
help_shortcut.Arguments = "help";
help_shortcut.Save();
IWshRuntimeLibrary.IWshShortcut uninstall_shortcut = shell.CreateShortcut(shortcut_path + "\\KShootMania Skin Manager\\Uninstall.lnk");
uninstall_shortcut.TargetPath = startup_shortcut.TargetPath;
uninstall_shortcut.Arguments = "uninstall";
uninstall_shortcut.Save();