[英]c# setting JumpList for app run from network share
I need to set the jumplist shortcuts for ac# app thats run off of 2008 server, but the machine the jumplists are be installed on are running Windows 7. 我需要为从2008服务器上运行的ac#应用程序设置跳转列表快捷方式,但是安装了跳转列表的计算机正在运行Windows 7。
I have no issues setting jumplists when app is run locally, so I know the code works. 在本地运行应用程序时,设置跳转列表没有问题,所以我知道代码可以工作。 I'm wondering if I'm missing a step or something (hopefully) obvious to others with more experience. 我想知道我是否错过了一个步骤,或者(希望)对其他有更多经验的人显而易见的东西。
Edit [ Doesn't the app get run on the win7 machine that executes it off of the server? 编辑 [该应用程序是否无法在从服务器上执行该应用程序的win7机器上运行? Could it be that I'm (unknowingly) trying to add the JumpList shortcuts to the 08 server start menu? 难道是我在(不知不觉中)试图将JumpList快捷方式添加到08服务器的开始菜单吗? I have just started developing for a living and I don't even know what I lack, any help is appreciated! 我刚刚开始谋生,我什至不知道自己缺少什么,感谢您的帮助! ] ]
Adding "my" code in case it could help: 添加“我的”代码以防万一:
#region Win7 Specific Code
if (m.Msg == Windows7Taskbar.TaskbarButtonCreatedMessage)
{
try
{
jlm = new JumpListManager(appID);
jlm.UserRemovedItems += delegate { };
string strAppDir = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
app = Assembly.GetEntryAssembly().GetName().Name + ".exe";
jlm.AddUserTask(new ShellLink
{
Title = "Smart Client",
Path = Path.Combine(strAppDir, app),
Arguments = "sc",
IconLocation = Path.Combine(strAppDir, @"ico\a.ico")
});
jlm.AddUserTask(new ShellLink
{
Title = "Web Client",
Path = Path.Combine(strAppDir, app),
Arguments = "wc",
IconLocation = Path.Combine(strAppDir, @"ico\b.ico")
});
jlm.AddUserTask(new ShellLink
{
Title = "TSQL Solution",
Path = Path.Combine(strAppDir, app),
Arguments = "ts",
IconLocation = Path.Combine(strAppDir, @"ico\c.ico")
});
jlm.AddUserTask(new ShellLink
{
Title = "C# Solution",
Path = Path.Combine(strAppDir, app),
Arguments = "cs",
IconLocation = Path.Combine(strAppDir, @"ico\d.ico")
});
jlm.AddUserTask(new ShellLink
{
Title = "Report Solution",
Path = Path.Combine(strAppDir, app),
Arguments = "rs",
IconLocation = Path.Combine(strAppDir, @"ico\e.ico")
});
jlm.Refresh();
Thanks in advance for any guidance offered. 在此先感谢您提供的任何指导。
Final solution was to build an application that had behavior similar to jumplists. 最终的解决方案是构建一个行为类似于跳转列表的应用程序。 As far as I know it is not possible to achieve my result while loading from a network share. 据我所知,从网络共享中加载时无法获得结果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.