Tuesday, December 12, 2017

windows 7 - Program crash in Win7/X64 related to filenames with % in them




For a while now I've had this reproducible error:



If I try to open any file (so regardless of its extension) that has a % in its name, regardless of the method of opening (click on it in Explorer, open it manually in the command prompt etc.), the program which is used to send the request (Explorer and cmd.exe, in the previous examples) would crash 100%.



Does anyone know the exact mechanism/sequence Windows uses to open a file? I could help out with debug information that way.


Answer



It's a long road from the point where you double-click on an icon on screen to the point where an application is started.



There is a lot go wrong.





  1. You click on a file.

  2. Windows determines the file type.

  3. Can this file be executed on its own, or does it require another application to open it?
    Let's check what the registry says about the file extension.

  4. Registry says it's a txtfile.

  5. Registry says, to open a txtfile we should use a program called C:\Windows\system32\NOTEPAD.EXE

  6. Now we can finally create our process:
    Process Create Event captures in Process Monitor




There is so much stuff involved, there is no way of telling what exactly is the problem. You need to perform further investigations yourself.



Please have a look at:




No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...