I had this exact set of symptoms, except that I was seeing the "How do you want to open this file? dialog appearing every morning when I first sat down at the computer rather than randomly.
I eventually tracked it down to a defragmenter program called MyDefrag (Note: site seems to be down currently). When you install MyDefrag, it optionally sets up a scheduled task to run at 5:01 AM every day to defragment your hard disk, and I had chosen that option. But the scheduled task that MyDefrag creates is misconfigured in some way that I haven't yet figured out, because when you run it manually, it pops up the "How do you want to open this file?" dialog. I eventually disabled the MyDefrag scheduled task and only ran MyDefrag manually, and the "open this file" dialogs went away.
In your case, if you haven't already given up and reformatted your computer, I'd suggest making a note of the exact time of day when you see the "How do you want to open this file?" dialog. Then after you've gotten enough times to establish a pattern (e.g., maybe it pops up every 2 hours starting from the time when the computer first boots up), then load up Task Scheduler and start browsing through the active tasks looking for one that fits that pattern. Once you find it, disable it (don't delete it yet, in case you haven't found the right one yet) and see if the problem goes away.
In my case, it took me a long time to track down the pattern, because the dialog was only popping up while I was asleep. I eventually found it by running ProcMon.exe (Process Monitor, a very handy part of Windows SysInternals) at night and looking through its data in the morning. (I had to trim it down first, because 8 hours of Process Monitor monitoring produced about 16 GB of data, and every single filter operation was taking 10 minutes to complete.) I filtered for the program OpenWith.exe, and found that it was running at 5:01 AM. That gave me the clue to look in Task Scheduler for tasks running at 5:01, which is how I found MyDefrag's misconfigured automatic task.
If you haven't yet wiped and reinstalled your operating system and you're still dealing with this random popup, I hope this helps you track it down. If you've already wiped and reinstalled, hopefully someone else who Googles this problem will be able to use this information to track down their own issue.
Sounds like systen corruption I would Refresh your machine – Ramhound – 2015-03-03T05:42:59.643
@Ramhound If I can't figure out where this is coming from, I might as well nuke it, do a completely clean install and destroy all the random crud that's accumulated over the years. Useful data's easy to restore from backup, it's the 10 zillion desktop applications that would need reinstalled that made porting my existing Win7 install to new hardware and upgrading to win 8 worth the effort. – Dan is Fiddling by Firelight – 2015-03-03T06:01:22.347
possible duplicate of How do I identify the process that owns a spurious dialog box?
– DavidPostill – 2015-03-03T08:51:27.0971@DavidPostill Unfortunately not. Clicking any other window dismisses the How... window. I tried taping the mouse button down with the intent of removing the tape to release it over the How... window once it appeared, but the cursor was reset to the arrow when the How.. windows appeared. – Dan is Fiddling by Firelight – 2015-03-03T11:53:28.267
same problem, it came from task scheduler. I upgrade win7→win10. But the tasks doesn't work like in windows7. In my case these popup came from autohotkeys & python tasks I did not updated. You can test if it's coming from the scheduler: just right-click/run on each task, the popup will show for the task. You will then just need to update it like this: https://stackoverflow.com/a/44873579/1486850
– JinSnow – 2017-07-02T21:06:54.167