Windows-explorer what program is called when opening a file

  • Thread starter Thread starter Marcel Cuylen
  • Start date Start date
M

Marcel Cuylen

I am trying to emulate what explorer does when you double
click on a selected file. In other words I need to know
the program name and arguments that are passed to it in
order to open the file with its registered program.
 
Marcel,

When you double-click a file, one of the things Windows checks is the file association. Defined under:

HKEY_CLASSES_ROOT\.nnn
(.nnn file-type is an example given)

Example: For EXE files

[HKEY_CLASSES_ROOT\.exe]
In the right-pane, it looks for the ProdID ("exefile" in this case), which is exefile and resolves to this key:
HKEY_CLASSES_ROOT\exefile\shell\command
In the right-pane, the (default) contains the Command, which is executed.

--
Ramesh, Microsoft MVP
Windows XP Shell/User
http://www.mvps.org/sramesh2k

Windows 2000 Group Policy Registry Table:
http://www.microsoft.com/windows2000/techinfo/reskit/en-us/gp/gpref.asp

I am trying to emulate what explorer does when you double
click on a selected file. In other words I need to know
the program name and arguments that are passed to it in
order to open the file with its registered program.
 
Back
Top