Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Windows' 'Open with' work? [closed]

Tags:

windows

dde

I was under the impression that when you double click a file (or choose 'Open With' from the right click menu), Windows simply calls the application with the filename as the parameter. Something like this:

C:\> App.exe file.abc

However, I just double clicked an .xls file and then checked the PEB of the Excel instance that sprang up. To my surprise the commandline did not contain the filename as a parameter.

So that set me wondering. What exactly is the mechanism Windows uses to have a file opened by a relevant application? Is there a special API that each application that supports such facility must expose?

like image 622
Frederick The Fool Avatar asked Mar 14 '10 14:03

Frederick The Fool


People also ask

How do I make Windows 10 open in the same place?

Open a window and position it where you like. Then double-click the icon in the upper left corner of the window. This should cause Windows to remember where the window was last opened.

When should you close your windows in the summer?

The basic rule of thumb is that you should close your windows when the temperature outside starts to exceed the temperature inside. It may seem counterintuitive, but as the temperature climbs, you'll often make your home warmer, not cooler, by opening the windows.


1 Answers

How Windows passes the file to the program varies from one application to another. This behavior is controlled by the registry.

In the case of Excel they use what is called DDE for the purpose. That's why you see nothing on the command line.

like image 154
SLaks Avatar answered Oct 14 '22 04:10

SLaks