在用户开始菜单 CSIDL_STARTMENU 中创建快捷方式的正确方法 [英] Correct way to create shortcuts in user start menu CSIDL_STARTMENU

查看:30
本文介绍了在用户开始菜单 CSIDL_STARTMENU 中创建快捷方式的正确方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 Windows 10 制作一个非升级的软件安装程序.安装程序将应用程序保存到 C:\Users\USER_NAME\AppData\Local\MY_APP_NAME 文件夹中.它还在 C:\Users\USER_NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\ 文件夹中创建一个快捷方式.快捷方式正确出现在开始"菜单中,但从未出现在搜索结果中.

I'm making a non-elevated software installer for Windows 10. The installer saves the application into C:\Users\USER_NAME\AppData\Local\MY_APP_NAME folder. It also creates a shortcut in C:\Users\USER_NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\ folder. The shortcut correctly appears in Start Menu, but it never appears in search results.

我尝试重建搜索索引并运行开始"菜单疑难解答,但没有成功.我来自波兰,因此我的机器上禁用了 Cortana.

I tried rebuilding the search index and ran Start Menu troubleshooter with no luck. I'm from Poland and thus Cortana is disabled on my machine.

我调查了该文件夹中的其他快捷方式,发现某些应用程序会出现在搜索结果中,而另一些则不会.例如,SourceTree 的链接出现在搜索结果中,而 R-Link 2 Toolbox 的快捷方式没有出现在那里.SourceTree 和 R-Link 2 Toolbox 都安装在 AppData\Local 文件夹中,两个快捷方式都保存到 AppData\Roaming\Microsoft\Windows\Start Menu\Programs\.我看不出他们的快捷方式文件有什么区别.但是我可以在搜索结果中找到 SourceTree,而 R-Link 不存在.此行为与应用程序名称中的空格无关.我尝试重命名我的应用程序以使其名称中没有空格,但这没有任何改变.

I investigated other shortcuts in that folder and found that some applications appear in search results while others do not. For example, a link to SourceTree appears in search results while a shortcut to R-Link 2 Toolbox do not appear there. Both SourceTree and R-Link 2 Toolbox are installed into AppData\Local folder and both shortcuts are saved to AppData\Roaming\Microsoft\Windows\Start Menu\Programs\. I don't see any difference between their shortcut files. Yet I can find SourceTree in search results while R-Link isn't there. This behavior isn't related to spaces in the app name. I tried renaming my app not to have a space in its name and this changes nothing.

我应该做些什么来注册我的索引快捷方式?

Is there something I should do to register my shortcut for indexing?

推荐答案

问题似乎与 Windows 操作系统的索引问题有关.似乎 sfc/scannow 命令解决了这个问题,现在索引对所有菜单文件夹和应用程序都能正常工作.

It seems the problem was related to indexing issues of the Windows OS. It seems sfc /scannow command solved the problem and now indexing works correctly for all menu folders and apps.

这篇关于在用户开始菜单 CSIDL_STARTMENU 中创建快捷方式的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆