How do I prevent my program’s temporary documents from appearing in Search?


A customer wanted to know how to disable Cortana and Search completely on their employees's systems. "A user should not be able to search for anything from anywhere."

That seems a rather broad statement. But what is the problem that they think disabling Cortana and Search will solve? In many cases, a customer asks for a way to hide something when in fact they really want to disable it. What is the thing they specifically want to prevent the user from searching for?

The customer explained that their program creates some files which are required for proper functioning, but they don't want the user to be able to search for and find those files. Users should be using the program to manage those files. The customer cannot block access to the files because their program needs them to function. The customer understands that a technically adept user will be able to find the files even when hidden them from search, but that's okay. They just don't want the files to distract casual users.

Consider a program which creates some Excel spreadsheets to assist with its calculations. If those Excel spreadsheets showed up in searches, then users would be tempted to open those Excel spreadsheets and start messing with them, which would confuse the program.

What the program should do is create those internal Excel spreadsheets in the Application Data directory, rather than in the Documents directory.

If that's not possible, it could at least mark the files as hidden. That would also remove it from search results.

These solutions avoid using a global solution to a local problem. It seems awfully presumptuous for a program to take it upon itself to disable searching outright, just because it wants to keep its own private files hidden. It's like cutting power to the entire house to make sure nobody watches television.

Bonus chatter: There are quite a few group policies in Computer Configuration\Administrative Templates\Windows Components\Search for controlling what shows up in the search index. For eaxmple, you can exclude specific directories from search, or exclude a list of file types.

Comments (22)
  1. JAS says:

    The problem they are trying to solve is that they don’t trust Cortana or Search. That means you guys. :/

    1. Entegy says:

      I’m pretty sure Raymond said what the customer was trying to accomplish and that ended up being the whole point of the story. But hey, ignore the back half of the post to make an irrelevant comment, thank you!

      1. JAS says:

        Entegy you can brown nose all you want. We didn’t hear how the story definitively ended, which means up to this point the customer was not satisfied with the inquiry. Is this where your usefulness ends or will you learn a new level of customer empathy?

        1. Darran Rowe says:

          It is amazing that from this lack of information that you can come to such a negative answer.
          Raymond has previously stated that once people do get their answer, they don’t follow up on the support that often. So the customer could be satisfied with the support, but just did not reporting the outcome.
          Also the description that Raymond provided doesn’t hint at your original point, he wrote:
          “The customer understands that a technically adept user will be able to find the files even when hidden them from search, but that’s okay. They just don’t want the files to distract casual users. ”
          To me, this states that as long as the files weren’t returned in a search result, then the customer didn’t care if Cortana or Search found them.
          One final point, that response was very rude wasn’t it. Don’t you care about the credibility of what you post?

          1. The_Assimilator says:

            He’s obviously a troll with an axe to grind; don’t bother engaging.

  2. Anonymous says:
    (The content was deleted per user request)
  3. As I started reading, my first instinct was “ah yes, because the indexing service sucks the life out of any machine without an SSD”; indeed, the customer probably could have solved several problems in one move by disabling all of this stuff.

    What I would really like would be a “no frills mode” to have an OS that does just its job, with none of the current bloat and distractions.

    The last Windows version I installed and used intensively was Windows 7; I still remember the joy buyingjust the OS, installing it and booting my new clean machine, no shovelware, no distractions, just the operating system, ready to be used as I intended. That has been my experience with pretty much every Windows <= 7 (Windows 2000 being probably the best in this regard).

    Fast forward several years, yesterday we set up a Windows 10 Professional VM as a build machine for our continuous integration system; it’s a thing that must pretty much just run a compiler and obeys to remote commands, so even the GUI would be pretty much superfluous.

    I am seriously appalled by the fact that what was once the job of OEMs – fill the menu with distracting adware/plain spyware and bog down the performance of the machine with useless auto-starting gimmicks – now is already provided by the regular Windows installer.

    During the installation we got asked, between the other things, whether we wanted the ads to be targeted. Targeted ADs? We don’t want no ads, period, this is a Windows copy that we paid for! Or again, if we preferred to share basic or extended information with Microsoft – what if I don’t want to share any? And notice, after logging in later there was yet another popup whining that the administrator decided to share only basic information (why should the user care?)

    We finally opened the firewall to let the machine update; besides the embarrassing number of reboots needed to install the updates, plus the usual couple that refuse to install at first try (notice: this is a freshly installed machine, from the last ISO available from Microsoft, on a run-of-the-mill VM, the most boring configuration ever), immediately in the start menu appeared animated tiles suggesting to install some Candy-Crush lookalike – now, what are animated Candy Crush ads doing on my Windows 10 Professional machine (again, paid solid money, that’s not shareware!), in one of the most valuable GUI spots possible?

    Finally, to get back to how this started, yes we disabled Cortana, search, the indexing service or however it’s called because yes, it was already starting eating the hell out of the disk (automatic updates are more than enough to keep the disks well exercised).

    Now, I’m sure there are way to disable all this, but again, I’m appalled that this is the user experience out of the box. Can we get back to something like the Windows <= 7 philosophy, when you installed Windows and you got Windows, period, standalone, no ads, no automatic information sharing, no background services killing the disk, and you could at least exercise some more choice of exactly what crap to install to bring the machine on its knees?

    1. cheong00 says:

      A.K.A.: “Noone want automations that they don’t need”.

      The Windows Security Center can’t detect the backup application that I use, but at least I can tell it to ignore that. The “Backup Helper” of Dell offers option “Don’t remind me again”, but simply ignore it and keep telling me I’ve not performed backup yet every 12 hours.

    2. cheong00 says:

      I share you feeling regarding the builtin Marketplace Ads. This should not be part of Business-use OS installation.

      Regarding Cortana, there are also annoying aspect that the stock market information I searched for on my phone repetitive pop up in notification area of my desktop for work. Not all kinds of “sharing between devices” are welcomed, especially those that can jump in front of your face during presentation.

      I hope these kind of “default settings” can change.

      1. cheong00 says:

        Btw, I’m using IE11 and seems the editor does not convert the paragraphs into paragraphs (i.e.: surrounded by “p” tags),

        Did you manually inserted the tags or else to get the paragraph breaks?

        1. Alex Cohn says:

          This has been discussed already. The line breaks are hidden by the blog SW on all browsers, but only for the logged in user.

          This means, you will see my reply as two paragraphs, while I see it as single block of text, unless I sign out.

    3. Jan Ringoš says:

      Can’t agree more. To certain extent the Windows 10 Enterprise LTSB continues to be those “just Windows” that we all grew to love, but that edition is not trivial to obtain and it’s use is limited by the license. If you can obtain proper MSDN subscription then you can get access to those for testing purposes. A build machine for continuous integration system sounds like exactly the role for LTSB.

      1. Didn’t know about LTSB, it’s very indicative that in a blog post with common questions about it there was this paragraph (roughly translated from Italian):

        WOW but this is the version that I want for all my PCs!

        Well, this is more or less the reaction of many clients when I explain them what is LTSB, as many corporations aren’t interested in Apps, or Edge, or Cortana, so they see in LTSB a version already purged of these unwanted features.

    4. Windows 10 Pro is a consumer license, so expect consumer-targeted features in it. What it sounds like you really wanted was Windows 10 Server Core Edition, which is a no-frills barebones server perfectly capable of doing what you want without any of the extra cruft.

      1. GL says:

        +1 for mentioning Windows 10 Pro is a consumer edition. Not until recently did I come to know that Microsoft no longer limits use of Windows 10 Home (w/o additional licenses) by businesses. The only problem of using Home in corporate environment is that it lacks some management features.

      2. Are you seriously telling me that I have to pay minimum 2x to have the privilege to get the same thing but without the crap? Mind you, I couldn’t care less about the other server features. Essentially, I just want a thing that can do CreateProcess.

        By the way, from what I hear about it I would love use Windows 10 LTSB not just for build machines, but even for my regular Windows VM; after reading about it and talking with friends and fellow developers, pretty much everyone said “wow, that’s windows as it should be! Can’t I have it on my desktop?”

        1. Tom West says:

          > Are you seriously telling me that I have to pay minimum 2x to have the privilege to get the same thing but without the crap?

          Yes. Think of it more as the price of Windows has doubled, but they offer a discount if you allow them to monetize you in other ways.

          Personally, my only objection is that they make the higher cost option really hard to get to. If I’m *that* valuable, then triple the price – just make it easy to get to for those of us who value our computing environment highly to buy the expensive option. (A bit like FB – I’d pay quite a bit for the no-ad, no tracking version – as is, I don’t use it as all.)

          Anyway, this is way off topic. Just because Raymond works for MS doesn’t make his blog the correct place for us to whine about MS business practices.

        2. DWalker07 says:

          If you are using the OS as a server — handling commands (compiles) from multiple other users, for example — then yes, you are expected to pay server prices.

          For example, I don’t think you are legally allowed to set up one copy of Windows 10 Pro to, let’s pick a random example, format Word documents as PDFs from other users (who might not have such abilities).

    5. roeland says:

      Well that went off-topic fast. I’m curious about that start menu though. The first thing I do on a new Windows 10 install is to delete those tiles — all of them.

      Other users will leave it and use the desktop or task bar to manage their favorite apps. That grid of blinking tiles and counters is just a big advertising billboard and it is just there, they won’t touch it.

      Is there is any telemetry about how people use the start menu? Is anyone, apart from a few power users, actually using those tiles?

    6. florian says:

      At least most of the Windows 10 apps can be uninstalled, including Edge, Cortana and Store.

      The following PowerShell scripts (many more can be found on the web) are easy to browse, and code fragments can also be reused selectively to get a more light-weight system:

      * https://github.com/W4RH4WK/Debloat-Windows-10
      * https://blogs.technet.microsoft.com/mniehaus/2015/12/31/updated-remove-apps-script-and-a-workaround/
      * https://gallery.technet.microsoft.com/scriptcenter/Remove-Windows-Store-Apps-a00ef4a4

    7. DWalker07 says:

      From what you described, you machine should be running Windows Server with Minimal Server Interface (https://msdn.microsoft.com/en-us/library/hh846317(v=vs.85).aspx) or else Server Core. Neither of those things has a bunch of “extra” things for humans to be distracted by.

      Don’t blame Windows Pro for having things that humans MIGHT want to use. If a human won’t use the OS, then maybe the OS should be a server. It sounds like a build server anyway, so… a server OS sounds like a good choice.

  4. I had this problem once. My solution back then was to store all files inside a file with structured storage format and don’t give it a filename extension. Of course, structured storage is created by someone who seems to take pleasure in tormenting developers. So, later I moved on the an open-source solution called “flat storage”. Nowdays, there are all sorts of virtual disk APIs with support for encryption, drive letter mapping, etc.

Comments are closed.

Skip to main content