{"id":554,"date":"2011-12-06T09:53:07","date_gmt":"2011-12-06T14:53:07","guid":{"rendered":"http:\/\/hoolihan.net\/blog-tim\/?p=554"},"modified":"2011-12-06T09:53:07","modified_gmt":"2011-12-06T14:53:07","slug":"windows-search-service-fixhack-for-windows-7","status":"publish","type":"post","link":"http:\/\/hoolihan.net\/blog-tim\/2011\/12\/06\/windows-search-service-fixhack-for-windows-7\/","title":{"rendered":"Windows Search Service Fix\/Hack for Windows 7"},"content":{"rendered":"<p>I&#8217;m not sure why, but Windows Search Service is broken on my installation of Windows. I&#8217;ve posted on Microsoft forums, and found other people with the same issue, but no fixes that have worked for me. The service will work, but every time I reboot, the service is disabled and stopped. I have to change it to manual or automatic, and start the service. It&#8217;s annoying, and if I forget to do it, I get messages (and slow searches) when using OneNote or Outlook.<\/p>\n<p>Finally, it occurred to me to powershell this. It&#8217;s a 2 line script:<\/p>\n<pre>\r\n<code>Set-Service -Name WSearch -StartupType Automatic\r\nStart-Service -Name WSearch<\/code>\r\n<\/pre>\n<p>Then I created a scheduled task that runs the script file on windows startup. The job is something like the following, depending on your path: <\/p>\n<pre><code>powershell.exe -noexit D:\\tools\\scripts\\WSearchFix.ps1<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/hoolihan.net\/images\/WSearchTask.jpg\" alt=\"The Scheduled Task\" \/><\/p>\n<p>Note a couple of things. First, WSearchFix.ps1 is just what I named the powershell script from above, name it as you please. Second, the -noexit is not necessary, especially once you&#8217;ve run the script and verified it works from the task scheduler.<\/p>\n<p>The most common problem is that if you don&#8217;t use powershell scripts, they are disabled by default. You can either sign them and use a semi-secure policy, or just open it up with:<\/p>\n<pre><code>Set-ExecutionPolicy Unrestricted<\/code><\/pre>\n<p>Finally, I went into the advanced options for the schedule tasks trigger and put it on a 2 minute delay. This is just a hunch, but I think something is setting the service to disabled on boot, so I wanted that to be done before the fix ran. <\/p>\n<p>Of course this is a hack, and I would like to just have the service work and stay disabled. But all things considered, this is a band-aid that works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m not sure why, but Windows Search Service is broken on my installation of Windows. I&#8217;ve posted on Microsoft forums, and found other people with the same issue, but no fixes that have worked for me. The service will work, but every time I reboot, the service is disabled and stopped. I have to change [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,18],"tags":[4,196,96],"class_list":["post-554","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-programming","tag-computers","tag-powershell","tag-windows"],"_links":{"self":[{"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/posts\/554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/comments?post=554"}],"version-history":[{"count":0,"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/posts\/554\/revisions"}],"wp:attachment":[{"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/media?parent=554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/categories?post=554"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hoolihan.net\/blog-tim\/wp-json\/wp\/v2\/tags?post=554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}