Skip to content

os.startfile documentation should recommend not specifying the operation #94302

@sredna

Description

@sredna

The current documentation claims that open is the same as not specifying an operation, this is not true. open forces the open verb/operation just like any other string forces that operation. open is often the same as unspecified but it might not be.

MSDN describes how the verb is resolved if NULL is passed to ShellExecute:

The default verb is used, if available. If not, the "open" verb is used. If neither verb is available, the system uses the first verb listed in the registry.

The "default verb" is the string that can be set in HKEY_CLASSES_ROOT\%progid%\shell of the file type.

NULL needs to be passed to simulate double-clicking a file in Explorer...

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsdocsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions