查看: 2662|回复: 4
收起左侧

[教程] Windows10 1909 可能出现的资源管理器搜索框无反应问

[复制链接]
hdx2016
发表于 2019-12-25 02:04:49 | 显示全部楼层 |阅读模式
这个问题其实有人反馈给微软,但是微软工程师需要更多的出问题的实例来解决这个问题。可惜我已经按照官方给的方法解决了。其中比较麻烦时PowerShell可执行策略的修改,要保证无签名的Powershell脚本能够执行。

我系统是1909 ,微软官方文档说适用于1903及后续系统,1809以及之前的版本是通过重置Cortana来重置搜索的,微软官方提供的方法链接我先挂在上面
  1. https://support.microsoft.com/en-us/help/4520146/fix-problems-in-windows-search
复制代码
我用的有用的方法直接贴在下面,这样方便有问题的朋友去微软文档找到对应的部分


Windows 10, version 1903 and later
If the Windows 10 May 2019 Update or a later update is installed, use Windows PowerShell to reset Windows Search. To do this, follow these steps.

Note You must have administrator permissions to run this script.
Download the "ResetWindowsSearchBox.ps1" script from the Microsoft Download Center, and save the file to a local folder:
Reset Windows Search PowerShell script
Right-click the file that you saved, and select Run with PowerShell.
If you are asked "Do you want to allow this app to make changes to your device?," select Yes.
The PowerShell script resets the Windows Search feature. When the word "Done" appears, close the PowerShell window.
If you receive a "Cannot be loaded because running scripts is disabled on this system" error message, enter the following command on the command line of the PowerShell window, and then press Enter:
   Get-ExecutionPolicy
Note The current policy appears in the window. For example, you might see Restricted. We recommend that you note this value because you'll have to use it later.
Enter the following command on the command line of the PowerShell window, and then press Enter:
   Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
Note You'll receive a warning message that explains the security risks of an execution policy change. Press Y, and then press Enter to accept the change.

To learn more about PowerShell execution policies, see About Execution Policies.
After the policy change is completed, close the window, and then repeat steps 2–4. However, when the "Done" message appears this time, DON'T close the PowerShell window. Instead, press any key to continue.
Revert to your previous PowerShell execution policy setting. To do this, enter the following command on the command line of the PowerShell window, press the Spacebar, enter the policy value that you noted in step 5, and then press Enter:  
   Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy
For example, if the policy that you noted in step 5 was Restricted, the command would resemble the following:
   Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Restricted
Note You'll receive a warning message that explains the security risks of an execution policy change. Press Y, and then press Enter to accept the change and revert to your previous policy setting.
Close the PowerShell window.

其中的问题在于ExecutionPolicy ,不过我要运行自己写的PS脚本所有我的ExecutionPolicy是更改过的,我的建议是更改前先用powershell查看你所有条件下对应的ExecutionPolicy
这个命令是:
  1. Get-ExecutionPolicy -List
复制代码
我的电脑会得出如下结果:
        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
LocalMachine    RemoteSigned
微软官方文档修改策略的Scope是CurrentUser,事实上在我的电脑运行脚本是需要管理员权限,我自己修改的Scope是LocalMachine,将其修改成Unrestricted,命令如下:
  1. Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted
复制代码
然后在管理员权限的下执行PS脚本
  1. .\ResetWindowsSearchBox.ps1
复制代码
会显示如下界面:
安全警告
请只运行你信任的脚本。虽然来自 Internet 的脚本会有一定的用处,但此脚本可能会损坏你的计算机。如果你信任此脚本,请使用
Unblock-File cmdlet 允许运行该脚本,而不显示此警告消息。是否要运行 C:\Users\DongX\Downloads\ResetWindowsSearchBox.ps1?
[D] 不运行(D)  [R] 运行一次(R)  [S] 暂停(S)  [?] 帮助 (默认值为“D”): r
Verifying that the script is running elevated
Resetting Windows Search Box
Done...
Press any key to continue...
然后关掉所有的资源管理器窗口,重新打开就好了,脚本也可以在我上面给的连接中下载。

另外我为什么用微软自带的搜索而不是用Everything等第三方,是因为我微软搜索建立的索引能够快速搜索所有文档的内容,这个功能是我想要的。因为我的文档太多了,就算我已经尽自己所能对文档加了各种标签和关键词,但有时候只记得内容的时微软搜索框能够快速搜索文件内容时真的棒,而且这功能不需要联网,断网也可以用。当然你需要打开Windows索引服务就是了。

下微软快速搜索文档内容的实例:搜索smartAudio 是这个机器自带的功能














快速搜索doc文档.png
快速搜索.png
mak999
发表于 2019-12-25 17:42:48 | 显示全部楼层
本帖最后由 mak999 于 2019-12-25 17:47 编辑

我是刪除注冊項也解決了,個性化那裡的搜索欄也解決了嗎
这里好像没人关心这个BUG…


2019-12-25 17-44-3.jpg
hdx2016
 楼主| 发表于 2019-12-26 16:07:22 | 显示全部楼层
mak999 发表于 2019-12-25 17:42
我是刪除注冊項也解決了,個性化那裡的搜索欄也解決了嗎
这里好像没人关心这个BUG…

个性化我不太清楚,我刚刚试了一些我的是好的。而且这个bug不是每个人都有,我两台Windows机器就这台有,另外一台Thinkpad没有。
个人不动注册表,毕竟我这个系统都是一直升级上来的。近两年没有重装了,虽然有系统备份。但是弄崩了系统再恢复要花近一个小时的时间(本人电脑是两块机械硬盘)。Windows自带的备份是差异备份速度蛮快的。等到注册表啥时候被刷爆了再说把,WindowsXP下真的有人用XP系统注册信息撑爆了注册表,系统提示注册表已满。不记得用了几年的系统。
MarkⅢ
发表于 2019-12-26 17:47:14 | 显示全部楼层
更新了win10 1909 我还以为我的电脑有问题了,搜索时好时坏的。
hdx2016
 楼主| 发表于 2019-12-26 20:38:08 来自手机 | 显示全部楼层
本帖最后由 hdx2016 于 2019-12-26 20:46 编辑
MarkⅢ 发表于 2019-12-26 17:47
更新了win10 1909 我还以为我的电脑有问题了,搜索时好时坏的。

这个只是某些机器或者系统可能会出的问题,但是出现后会很稳定的复现,不存在时好时坏,坏的一直就是坏的。你这个时好时坏应该不属于我这个问题,可能是你用了一些软件优化系统的问题,比如清理垃圾,优化服务之类的功能导致的,也有可能是软件冲突,系统更新前先更新自己要用的软件,否则容易造成冲突。

我的系统没有用软件优化过,也没清理过,而且主力机也不敢折腾。就用个eset这种愿意使用微软提供的API而不是自己造轮子的反病毒,很多自己造轮子的反病毒软件在设计驱动的时候不可能有微软设计API时考虑的全面,会造成更多的bug。
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2024-5-7 19:26 , Processed in 0.138427 second(s), 19 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表