Performs an operation on a specified file.
This method allows you to execute any commands in a folder's shortcut menu or stored in the registry.
To open a folder, use either of the following calls:
ShellExecute(handle, NULL, <fully_qualified_path_to_folder>, NULL, NULL, SW_SHOWNORMAL);
or
ShellExecute(handle, "open", <fully_qualified_path_to_folder>, NULL, NULL, SW_SHOWNORMAL);
To explore a folder, use:
ShellExecute(handle, "explore", <fully_qualified_path_to_folder>, NULL, NULL, SW_SHOWNORMAL);
To launch the Shell's Find utility for a directory, use:
ShellExecute(handle, "find", <fully_qualified_path_to_folder>, NULL, NULL, 0);
If lpOperation is NULL, the function opens the file specified by lpFile. If lpOperation is "open" or "explore", the function attempts to open or explore the folder.
To obtain information about the application that is launched as a result of calling ShellExecute, use ShellExecuteEx.
Note The Launch folder windows in a separate process setting in Folder Options affects ShellExecute. If that option is disabled (the default setting), ShellExecute uses an open Explorer window rather than launch a new one. If no Explorer window is open, ShellExecute launches a new one.
Windows 95/98/Me: ShellExecute is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.